Reputation: 1209
I am new in angularjs, I am getting employment status and i just want if i am getting employement status equal to HALFTIME then PartTime text should be display,Here is my code but not working,showing me nothing,where i am wrong ?
<h2 ng-if="{{myprofile.myJobs[0].employmentType}}==HALFTIME">
Part Time
</h2>
Upvotes: 1
Views: 111
Reputation: 5947
You don't have to use interpolation {{ var }}
.
<h2 ng-if="myprofile.myJobs[0].employmentType == HALFTIME ">
Part Time
</h2>
Upvotes: 2
Reputation: 3618
This is the correct syntax:
<h2 ng-if="myprofile.myJobs[0].employmentType == 'HALFTIME'">
Part Time
</h2>
You don't need curly braces inside ng-if
Upvotes: 4