I'm trying to compare a string value inside ng-if but it doesn't work properly.
For example, i have this scope value to be compared with a string:
vm.val = 'abc'; //or vm.myval = 'afg';
And the html looks like this:
<div ng-if="vm.myval == 'abc'> Option abc </div>
<div ng-if="vm.myval == 'afg'> Option afg </div>
But the output is always the first option, Option abc. I even tried using === but the result is the same.
How can I compare this to an exact match of the strings?