aurelia / templating-binding

An implementation of the templating engine's Binding Language abstraction which uses a pluggable command syntax.
MIT License
32 stars 26 forks source link

_aureliaBinding.delegationStrategy is undefined #105

Closed SteveHartzog closed 7 years ago

SteveHartzog commented 7 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: If your custom element is loaded as a global resource with a click.trigger in it, and you attempt to load the app, an error is thrown in the console in the vendor bundle line 40525 (which appears to be dist/amd/aurelia-templating-binding.js, line 379, of the SyntaxInterpreter.prototype.trigger function): Unhandled rejection TypeError: Cannot read property 'none' of undefined. Hitting this breakpoint in the browser shows undefined for _aureliaBinding.delegationStrategy. The app doesn't load, and the browser page is then blank.

Expected/desired behavior: When using click.trigger in a template loaded as a global resource the page should not break or should still load. This works in aurelia-templating-binding@1.0.0, but not 1.1.0.

jdanyow commented 7 years ago

hi @SteveHartzog - this sounds like the aurelia deps in your node_modules folder are potentially screwed up.

Try deleting the node_modules folder and re-installing the deps:

windows shell:

rmdir /s /q node_modules
npm install
SteveHartzog commented 7 years ago

That fixed it.

My original repo steps were to add aurelia-bootstrapper@2.0.0 (which in turn installs aurelia-templating@1.1.0) to see the error. Resetting bootstrapper to 1.0.1 & templating to 1.0.0... fixed it. I could go back and forth with the same results. Odd.