Reputation: 1094
I have an
ng-if="dc.emailNotificationSchedule.progressInterval === dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN"
.
What i want to do is to have one time bindings for both variables in ng-if
. But when i try to use
ng-if="(::dc.emailNotificationSchedule.progressInterval) === (::dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN)"
angular throws the following error :
Error: [$parse:syntax] Syntax Error: Token ':' not a primary expression at column 2 of the expression [(::dc.emailNotificationSchedule.progressInterval) === (::dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN)] starting at
[::dc.emailNotificationSchedule.progressInterval) ===
(::dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN)].
What is the right way ?
Upvotes: 2
Views: 739
Reputation: 26930
Try this way:
ng-if="::(dc.emailNotificationSchedule.progressInterval === dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN)"
Upvotes: 2
Reputation: 803
this should works fine:
ng-if="::dc.emailNotificationSchedule.progressInterval == dc.SkillCompletionProgressIntervals.NEVER_LOGGED_IN"
You don't need double colon twice
Upvotes: 1