angular.js - How to design routing with SpringMVC+Angular, using more than index.html as the entry point from multiple pages
PHP中文网
PHP中文网 2017-05-15 16:49:18
0
3
843

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.

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
迷茫

http://ued.taobao.org/blog/2014/04/xtpl/

Peter_Zhu

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.

Peter_Zhu

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template