Since update to AngularJS 1.7 (from 1.6) there seem to a breaking chance or at least something we did wrong and now results in an undefined issue.
I tried to consult AngularJS changelog, searched and tried a lot but cannot find the solution.
Directive Call - it's verified that myAllocation is not null and has all required properties
<ac-allocation ac-allocation="myAllocation"></ac-allocation>
Directive Code
function acAllocation(SomeService) {
return {
restrict: 'E',
replace: true,
scope: {
allocation: '=acAllocation'
},
controller: acAllocationController,
controllerAs: 'vm',
bindToController: true,
templateUrl: 'components/some.html'
};
function acAllocationController() {
var vm = this;
if (vm.allocation) {
// this fails as vm.allocation is not defined anymore, but it used to be
}
}
}