I'm trying to compare
ng-repeat="conversation in vm.conversations" ng-if="conversation=second">
conversation
with the value "second"
What is my mistake?
I'm trying to compare
ng-repeat="conversation in vm.conversations" ng-if="conversation=second">
conversation
with the value "second"
What is my mistake?
You must use the comparison operator ==
and it should be like this:
ng-if="conversation=='second'"
Remember that the value you are looking for is 'second'
, it is a text and it should be within quotation marks
You should compare this way:
conversation == second
By using a single =
you are making an assignment and not a comparison.
I hope it's what you're looking for, otherwise you can ask again as many times as you need.