This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-hide evaluates empty strings as truthy #5691
Closed
Description
Version 1.2.0 introduced a bug in my UI where ng-hide treats a promise evaluated as an empty string as truthy. Up to version 1.0.8, ng-hide would evaluate an empty string as falsy, following Javascript logic:
"" == true
false
"" == false
true
This is a standard case IMO: a controller calls a service for logged user, server returns 204 code (no content), $http receives an empty string as data, calls promise resolve() with an empty string. The directive <div ng-hide="variable">
should treat variable
with empty string as falsy.
Metadata
Metadata
Assignees
Labels
No labels