收集一些常用的代码
 

angularJS配置路由

var someModule = angular.module('someModule', [...module dependencies...])

someModule.config(function($routeProvider) {

$routeProvider.

when('url', {controller:aController, templateUrl:'/path/to/tempate'}).

when(...other mappings for your app...).

otherwise(...what to do if nothing else matches...);

)};


 
评论
© 代码|Powered by LOFTER