I am new to angularjs. Not being able to find a way to include a couple of li
items together inside an ng-if
. Knockout had virtual elements doing the jobs, like this
<ul>
<li>This item always appears</li>
<!-- ko if: someExpressionGoesHere -->
<li>I want to make this item present/absent dynamically</li>
<li>I want to make this item present/absent dynamically</li>
<!-- /ko -->
</ul>
Would appreciate help.
update: Enclosing inside a container like <div>
or <span>
is distorting the view when used inside the nav in bootstrap:
<div ng-if="!auth.user">
<li>
<a href="#!/signup">Sign up <span class="glyphicon glyphicon-list-alt"></span></a>
</li>
<li>
<a href="#!/login">Sign in <span class="glyphicon glyphicon-log-in"></span></a>
</li>
</div>
Sanjay