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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -