Reputation: 6894
I'm trying to conditionally display using ng-show in angular and it doesn't seem to work. Where am I going wrong ?
<body ng-controller="MainCtrl">
<select ng-model="type" ng-init="type='WEP'">
<option value="None">None</option>
<option value="WEP">WEP</option>
<option value="WPA">WPA</option>
<option value="WEP Admin">WEP Admin</option>
</select>
<p ng-show="type == 'WEP' || 'WPA' ">{{type}}</p>
</body>
Demo : http://plnkr.co/edit/jvqW2w6hg6gq6YVsjAgh?p=preview
Upvotes: 0
Views: 99
Reputation: 6639
<p ng-show="type == 'WEP' || type == 'WPA' ">{{type}}</p>
please try this.
Upvotes: 1