SpringMVC Angular makes complex applications, which are generally not single-page applications. If you want to continue using Angularjs, how should you design routing? This is my first contact and I feel very confused. Please give me some advice.
天蓬老师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