Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-if/ng-show; either test or inverted test is shown #5857

Closed
eirikwang opened this issue Jan 17, 2014 · 2 comments
Closed

ng-if/ng-show; either test or inverted test is shown #5857

eirikwang opened this issue Jan 17, 2014 · 2 comments

Comments

@eirikwang
Copy link

There is an issue with the letters f, n, and [] when used in ng-if.

<p ng-if="name">true</p>
<p ng-if="!name">false</p>
<input ng-model="name">

when input is f, n or [], either true, or false is shown. I belive this has something to do with the toBoolean function.

http://plnkr.co/edit/Pypt8yaQWzHDVD9MOusy

@caitp
Copy link
Contributor

caitp commented Jan 17, 2014

It does, and this is a dupe of #3436 and probably others. I'm hoping we're going to throw away toBoolean() for 1.3 if not for 2.0, but for the time being, it's not going to change

@linclark
Copy link
Contributor

Closing this as a duplicate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants