@{Layout=NULL;}<! DOCTYPE html>varApp = Angular.module ("myApp", []); App.controller ("Firstcontroller",function($scope, $timeout) {setTimeout (function () { //$scope. Name = "111";//This will not change the value of name after two seconds$scope. $apply (function() {//using some external methods (such as js,jquery) to make the model change we need to use the $apply: the usage is to put the external method to execute in $apply ()$scope. Name = "111"; }); }, 2000); $scope. Name= "Zhang San"; $scope. Age= 10; $scope. Show=function() {$scope. Name= "Click me Now"; } $timeout (function() {$scope. age= "50"; }, 2000); }); App.controller ("Secondcontroller",function($scope) {$scope. iphone={money:15, Num:1, Fre:10 }; $scope. Sum=function () { return$scope. Iphone.money *$scope. Iphone.num; }; $scope. $watch ($scope. Sum,function(NewValue, OldValue) {//monitor changes in $scope.sum$scope. Iphone.fre = newvalue >= 100? 0:10; }); }); </script>changes in the model of $apply propagation$watch Monitor the model changes{{name}}<br/>{{Age}}</div> <div ng-controller= "Secondcontroller" > <p> Price: <input type= "text" ng-model= "IP Hone.money "/></p> <p> number: <input type=" text "ng-model=" Iphone.num "/></p> <p> Fee: <span>{{sum () | Currency: ' ¥ '}}</span></p> <p> shipping: <span>{{iphone.fre | Currency: ' ¥ '}}</span></p> <p> total: <span>{{sum () +iphone.fre | currency: ' ¥ '}}</span>& Lt;/p> </div> </div></body> Angularjs Practice Demo1