Reputation: 2588
I am trying to show a block in Angular only if ID is of specific value.
I tried this in the following code ng-if="{{what.nid}} === 12"
, but it didn't work.
<ng-map zoom="11" center="[40.74, -74.18]" ng-if="{{what.nid}} === 12">
<marker position="[40.74, -74.18]" />
<shape name="circle" radius="400" center="[40.74,-74.18]" radius="4000" />
<control name="overviewMap" opened="true" />
</ng-map>
Upvotes: 0
Views: 280
Reputation: 861
ng-if
accepts an expression, so using {{}}
inside of it is not necessary, just use ng-if="what.nid === 12"
Upvotes: 2