We were hit by an old breaking change in our legacy AngularJs application which we won't update to Angular >2 soon.
Since AngularJs 1.6 $compileProvider.preAssignBindingsEnabled
was set to 'true' by default but up there was an option to set it to 'false'.
With AngularJs 1.7 this behaviour isn't allowed anymore.
So we have to check where we are using bindings in components/directives to use the new $onInit function which is called once all bindings are available for sure.
Since we don't use .component
but .directive
only:
Is it true, that we only have to apply this change for all directives which are using bindToController: true
?
Or which other cases might be forced to consider?
Update for clarification:
- I understand that we have to change/upgrade to make it work and why.
- What I am not perfectly understanding (and didn't see it in the suggested duplicate either): When not using components at all, where does this change affect us? Is ot only when we directives with bindToController: true or are there others (potentially less intuitive like using $scope in a specific way/context etc.). From reading the upgrade instructions we only got the component example.