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

ng-show expression evaluates to false when passed "f" or "F" #7312

Closed
blown-capacitor opened this issue Apr 30, 2014 · 2 comments
Closed

ng-show expression evaluates to false when passed "f" or "F" #7312

blown-capacitor opened this issue Apr 30, 2014 · 2 comments

Comments

@blown-capacitor
Copy link

For example assuming $scope.mystring = "F";

<div ng-show="mystring">{{mystring}}</div>

The div is hidden by the ng-show directive.

Note you can achieve desired functionality using .length <div ng-show="mystring.length"></div>

JSFiddle example

@Narretz
Copy link
Contributor

Narretz commented May 1, 2014

This is currently expected behavior, as documented: https://docs.angularjs.org/api/ng/directive/ngShow

You may want to weigh in here: #4005

@lgalfaso
Copy link
Contributor

A fix for this is scheduled for 1.3, closing this issue as it is a duplicate of an issue that is tracked somewhere else

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