Controller:
angular.module('myApp', [])
.controller('MainCtrl', function($scope) {
$scope.d = { v1: '100', v2: '20' };
});
Template:
<div ng-app="myApp">
<div ng-controller="MainCtrl">
1: <input type="text" ng-model="d.v1" />
2: <input type="text" ng-model="d.v2" />
<h4>{{d.v1}} < {{d.v2}} = {{d.v1 < d.v2}}</h4>
</div>
</div>
http://jsfiddle.net/GDfxd/292/
This example incorrectly shows that 100 is less than 20. Any advice how to make this comparison numeric ?
stringsnotnumbers, you need to convert before compare jsfiddletype="number"