javascript - How to get a filtered angular string as a js function parameter? -


i want have string goes through angular's filter parameter javascript function. angular doesn't parse it, how fix this?

<input type="text" ng-required="true" ng-model="foobar" oninvalid="this.setcustomvalidity({{ 'string' | myfilter }})"> 

the {{ .. }} not go through angular's parsing. if remove double quotation marks still doesn't work angular 'fixes' oninvalid="this.setcustomvalidity("{{

also, if there another, more angular way of customizing browser validation message, trick me also.

you might want read angular documentation input, in particular example plunker provides solution question.

if still want hint on use filter in argument please provide information oninvalid directive.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -