Reputation: 13577
I didn't realise that ng-if
creates a child scope, which caused quite a confusion. What're the reasons/benefits for ng-if
's scope creating? What are other built-in directives that create child scopes?
The scope created within ngIf inherits from its parent scope using prototypal inheritance.
Upvotes: 2
Views: 333
Reputation: 13577
So these are the keywords I used to find all the directives that create scope, thanks to @sp00m's prompt.
Providing that Angular's documentation is consistent in the way they describe directives, which it seems to be, below is the full list of results, in order of priority level of execution:
Upvotes: 1