AngularJS – How to use ng-if without HTML element
There’s a currently-undocumented pair of directives, ng-if-start and ng-if-end, that you can use for this. They behave analogously to the documented ng-repeat-start and ng-repeat-end directives, and you can see the unit tests for them if you like. For example, given the following code: <ul> <li ng-if-start=”true”>a</li> <li>b</li> <li>c</li> <li ng-if-end>d</li> <li ng-if-start=”false”>1</li> <li>2</li> <li>3</li> <li … Read more