<!DOCTYPE html> <html lang="en" ng-app="myApp"> <head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript" src="js/angular-1.3.0.js"></script> <script> var m1 = angular.module('myApp',[]); m1.controller("may",['$scope',function($scope){ $scope.name = "hello!!!!" setTimeout(function(){ $scope.$apply(function(){ $scope.name = "hi"; }) },2000) }]) </script> </head> <body ng-controller='may'> <p>{{name}}</p> </body> </html>