You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
The properties set in an isolated scope object hash for a directive, are not bound to the controller, even when using bindToControler: true. They only appear to be bound to the template.
Here's a demo: https://jsfiddle.net/z9pgasbt/
It will console.log undefined for a value called name that has been bound via isolate scope to the controller. All documentation and tutorials point to it should work this way.
What is the expected behavior?
The above example should print "Foobar" instead of undefined. Technically speaking, the properties defined in an isolate scope should be bound to the controller, and should be usable as such in the controller - not just in the template.
What is the motivation / use case for changing the behavior?
Using bindToController with controllerAs as it appears to be intended.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Firefox 50, AngularJS 1.6.1.
Tested with snapshot version - problem persists.