AngularJS Upgrade (1.5 to 1.6,1.7) Makes directive scope bindings undefined
The AngularJS team recommends that controller code that depends on scope bindings be moved into an $onInit function. function LayoutController($scope, LayoutDTO, LayoutPreviewDTO) { var self = this; this.$onInit = function () { // bindings will always be available here // regardless of the value of `preAssignBindingsEnabled`. self.layoutDTO = LayoutDTO; self.layoutPreviewDTO = LayoutPreviewDTO; var test = … Read more