阅读背景:

是否有可能只在$ routeProvider.when()中传递templateUrl

来源:互联网 

Can we do something like this?

我们可以这样做吗?

 GuitarApp.config(['$routeProvider', function($routeProvider) {
  $routeProvider.
  when('/list', {
    templateUrl: 'partials/list.html',
    <!-- no controller here -->
  }).
  when('/details/:guitarID', {
    templateUrl: 'partials/details.html',
    controller: 'DetailsController'
  }).
  otherwise({
    redirectTo: '/list'
  });
}]);
 G



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: