SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 179 JavaScript

feat($parse): add support for ternary operators to parser

Add '?' token to lexer, add ternary rule to parser at
(hopefully) proper precedence and associativity (based
on https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Operator_Precedence).
Since (exp1 && exp2 || exp3) is supported by the parser,
and (exp1 ? exp2 : exp3) works the same way, it seems
reasonable to add this minor form of control to templates
(see #719).
Z
Zach Snow committed
6798fec4390a72b7943a49505f8a245b6016c84b
Parent: cefbcd4
Committed by Pete Bacon Darwin <pete@bacondarwin.com> on 5/16/2013, 9:30:37 PM