What impact does the order in which boolean operators are declared have?
Controller:
$scope.show = false;
$scope.clickMe = function() {
$scope.show = true;
$scope.name = 'Name defined'
};
Template:
<button ng-click="clickMe($event)">Click Me</button>
<p ng-if="::(show && name)">show && name</p>
<p ng-if="::(name && show)">name && show</p>
Results in the second p
element with the order of name && show
displaying after clicking button. I understood that neither p
element should display as $scope.show
is already defined and one time binding has been used?
plunkr here: