Answer the question
In order to leave comments, you need to log in
How to update a directive in JS file in AngularJS?
I have this html page:
<input type="number" placeholder="Длина" ng-model="length">
<a ng-click="start()">Рассчитать</a>
Расчет: {{length}}
$scope.length = 2;
$scope.start = function() {
$scope.length = $scope.length * 2;
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question