-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Update ngIf.js doc. Added missing description of ng-if behavior. #7776
Conversation
Added missing description of ng-if behavior that it will return false for "f", "0", "false", "no", "n", "[]" values because it use toBoolean function
I'm sure we have a similar thing like this in the docs somewhere, or it's at least been proposed... let me see if I can find it |
ah I see, so it's pretty much copy/pasted from the ngShow/ngHide docs... hmm. The thing that I don't really like about this is, eventually we're going to get rid of the toBoolean stuff, and we might forget to clean up all of these notes in the docs. |
There is no info in docs. Only for ng-show/hide but not for ng-if :) But I did not search other pull requests. |
Ohh.. this is good :) I faced some problems with toBoolean function and had to change code :) |
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
Done |
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
@@ -16,6 +16,11 @@ | |||
* case when this difference is significant is when using css selectors that rely on an element's | |||
* position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes. | |||
* | |||
* <div class="alert alert-warning"> | |||
* **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still says ngShow here instead of ngIf.
fix cp typo - ngShow -> ngIf
Also I suggest to inform inside alert block at ngIf, ngShow and ngHide doc pages that they have similar behaviour |
Trailing whitespace
Closing in favor of #7960 |
Added missing description of ng-if behavior that it will return false for "f", "0", "false", "no", "n", "[]" values because it use toBoolean function