angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

Incorrect priority of operator | in assignment expression

Open glagola opened this issue 14 years ago • 1 comments

We have to use <div ng-init="str2=('HELLO'|lowercase)"></div> insted of <div ng-init="str1='HELLO'|lowercase"></div>

Example http://plnkr.co/edit/io8ylf?p=preview

glagola avatar Aug 30 '12 11:08 glagola

Actually that is the correct priority. Filter is the last thing to be evaluated, and it is not ment to be used in this way. putting behavior in HTML is not advised.

mhevery avatar Aug 31 '12 17:08 mhevery