angularjs - Using 'No' in Angular ng-show -


so have piece of code. element should shown if model optionfalse set, , if not not shown:

<input ng-show="optionfalse" type="radio" name="example_boolean" />{% verbatim %}{{ optionfalse }}{% endverbatim %} 

the way set optionfalse value via ng-model:

 <input ng-model="optionfalse" type="text" name="answer_opt_true" value="" /> 

so if type text input radio should appear. works fine every keyword, when type 'no' input doesn't appear. why that? somehow no evaluated false? if so, how can find workaround?

the same behaviour happening when type 'n'. othe letters works fine.

angular binds ng-show boolean value. needs true element show.

note: here list of values ngshow consider falsy value (case insensitive): "f" / "0" / "false" / "no" / "n" / "[]"

taken angularjs docs


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -