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

Description
For some reason, when ng-if directive receives string '0' the statement is evaluated as false. I am not sure if this is a bug or a feature, but I believe it's wrong behaviour because it makes ng-if behave inconsistent. See the following plunker:
http://plnkr.co/edit/GSwxpOyJvCkM66KqqDct
- Any string evaluates to
true, it's negation evaluates to false.
- Integer
0 evaluates to false, it's negation evaluates to true.
- Integer
1 evaluates to true, it's negation evaluates to false.
This is how JavaScript works and I would expect Angular to behave the same way, but in angular template the following is also true:
- String
'0' evaluates to false, it's negation evaluates also to false.
Expected behaviour:
- String
'0' evaluates to true, it's negation evaluates to false.
If this is really a feature, shouldn't at least the negation evaluate to the opposite value?