如何解决angular.dart路由?

时间:2014-03-18 20:11:05

标签: angularjs dart angular-dart angular-routing

如何解决angular.dart路线?我想做类似的事情:

angular.module('ngRouteExample', ['ngRoute'])
.config(function($routeProvider, $locationProvider) {

 $routeProvider
   .when('/Book/:bookId', {
    templateUrl: 'book.html',
    controller: 'BookController',
    resolve: {
      // I will cause a 1 second delay
      delay: function($q, $timeout) {
        var delay = $q.defer();
        $timeout(delay.resolve, 1000);
        return delay.promise;
      }
    }
  })
});

1 个答案:

答案 0 :(得分:1)