I have a value {{category}} which is to printed using angular js. Based on the value I have to change the contents of div.
if {{category}} = "aa" then <div>aa</div>
if {{category}} = "bb" then <div>bb</div>
how is this possible.
I have a value {{category}} which is to printed using angular js. Based on the value I have to change the contents of div.
if {{category}} = "aa" then <div>aa</div>
if {{category}} = "bb" then <div>bb</div>
how is this possible.
Use ng-if:
<div ng-if="category === 'aa'">aa</div>
<div ng-if="category === 'bb'">bb</div>
Or:
<div>{{category}}</div>