angular/angular.js — pull request #4726 by btford (2013-10-30 22:16:08+00:00)
Title: fix(ngIf): ngIf removes elements dynamically added to it

When using ngIf with ngInclude on the same element, ngIf previously did not remove elements added by ngInclude. Similarly, when using ngIfStart/End, ngIf will miss elements added between the start/end markers added after ngIf is linked.

This commit changes the behavior of ngIf to add a comment node at the end of its elements such that elements between the starting comment and this ending comment are removed when ngIf's predicate does not hold.