AngularJs 使用 $timeout

angular.module('myApp.test', ['ngRoute'])
    .config(['$routeProvider', function($routeProvider) {
        $routeProvider.when('/', {
            templateUrl: 'views/homePage/homePage.html',
            controller: 'homePageController'
        });
    }])

    .controller('homePageController', ['$scope', '$timeout', function($scope, $timeout) {
        // ....
        $timeout(function() {
            $scope.finish = true
        1000);
        // ...
}]);


你可能感兴趣的:(JavaScript,html,AngularJS)