I'm trying to understand why ng-if isn't showing the right content.
<div ng-if="user.premium">
<p>If user.premium is true show this content</p>
</div>
<div ng-if="!user.premium">
<p>If user.premium is false show this content</p>
</div>
This seems to be the way I would expect it to work. I've done a console.log on user.premium and it returns the following data.
premium: false;
In this instance I would believe that the content to be shown would be the false content.
In this case I'd expect only the true content to show.
premium: true;
However on both true and false I'm getting the true content showing in my DOM.
How would I go about showing the correct content if the property is true or false.
console.log(user.premium)what does return?user.premiumyou getpremium: trueortrue? sorry just to clarify it :)