输入新值后,我是很新的angularJS不能更改默认值输出
下面是我CONTROLER
var app = angular.module('ChildPlanning', ['rzModule', 'ui.bootstrap']);
app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal)
$scope.ir ={
value:8
};
$scope.result1 = pv*(Math.pow((1+(rateofreturn.value/100)), tenure.value));
$scope.result2 = ((((annuityrate.value/100)/ 12)*(Math.pow((1+((annuityrate.value/100)/ 12)), lifeexpectancy.value*12)));
$scope.annuity_future = $scope.ir.value * $scope.result1 * $scope.result2;
}
我的HTML
输入HTML 1
<input name="inflation" type="text" id="ir" ng-model="ir.value" >
输出html
<span>{{ annuity_future }}</span>
当我手动输入字段中键入改变输入“ir.value”的默认值,在输出的值是不会改变相应
要做到这一点,thisway因为我有要做到有很多变量的长数学运算和非常可变我使用有我面临着同样的问题
在此先感谢
因为您从不告诉'ir.value'采用'annuity_future'的值。 – SjaakvBrabant
我该怎么做? –
是[this](http://plnkr.co/edit/UfbbZ3uXFcc9NRhEXHhz?p=preview)你想要什么? – SjaakvBrabant