Hi,
I don’t understand <ion-content>
tag while doing math operation in controller. Here I’m try to do simple sum operation.
this is work as expedted http://jsfiddle.net/p8eejge1/
in ionic, it’s work only when I remove <ion-content>
tag
.controller('BrowseCtrl', function($scope) {
$scope.n1 = 1;
$scope.n2 = 1;
$scope.sum = function() { return $scope.n1 + $scope.n2; }
})
<ion-view view-title="Browse">
<ion-content>
<input type = "number" ng-model = "n1"/> +
<input type = "number" ng-model = "n2"/> =
<span>{{ sum() }}</span>
</ion-content>
</ion-view>
what I am missing?