SpringMVC+Angular做复杂的应用,一般都不是单页应用,如果想要继续使用Angularjs的话,应该如何设计路由呢?初次接触,感觉很迷惑,求指教。
天蓬老师2017-05-15 16:51:18
You can use angularjs’ own routing module, as follows:
angular.module('myApp',['ngRoute']).config('$routeProvider',
function($routeProvider){
$routeProvider.when("url",{
templateUrl: '',
controller: ''
}).otherwise({
redirectTo : 'url'
})
}
);
If this is not enough, you can learn ui-router: https://github.com/angular-ui/ui-router, which is more powerful.
天蓬老师2017-05-15 16:51:18
ANGULAR SPA + JERSEY + SPRINGMVC integrated application This article explains it very clearly
http://www.liaozhida.net/angular/angular-spa-jersey-springmvc-%E6%95%B4%E5%90%88%E5%BA%94%E7%94%A8.html