ternary not working in angular 1.7
As discussed in https://github.com/angular/angular.js/blob/master/CHANGELOG.md
$parse: add support for ternary operators to parser
But it does not work . My expression is
var getter = $parse('first + second == third ? "Rohit Bansal" : "Not Rohit" '); var context = {first:"Rohit",second:"Bansal",third:"RohitBansal"}; $scope.result = getter(context);
Where as var getter = $parse('(first + second == third )&& "Rohit Bansal" || "Not Rohit"'); working nice
http://plnkr.co/edit/Ws1yQk?p=preview
I think you are in an error the version 1.7 does not exist; the version you reference is 1.1.5 i think you are using 1.0.7
Thanks a lot. Its working fine for me now using 1.1.5.