I have an angular snippet that can be simplified to this view:
<div ng-if="vm.selectedItem !== null">
<div ng-if="vm.selectedItem.someProperty !== null">
</div>
</div>
I expect that internal div would not execute it's expression if the top div is not added to DOM based on ng-if, but in reality I get Cannot read property 'someProperty' of null
when something changes.
Is it the default behavior of angular and there are not guarantee on the order here and I cannot rely on the outer div ng-if's?