国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - SpringMVC+Angular如何設(shè)計路由,從多個頁面不只index.html作為入口
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-05-15 16:49:18
0
3
935

SpringMVC+Angular做複雜的應(yīng)用,通常不是單頁應(yīng)用,如果想要繼續(xù)使用Angularjs的話,應(yīng)該如何設(shè)計路由呢?初次接觸,感覺很迷惑,求指教。

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證高級PHP講師

全部回覆(3)
迷茫

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

Peter_Zhu

可以使用angularjs自己的路由模組,如下:
angular.module('myApp',['ngRoute']).config('$routeProvider',
function($routeProvider){
$routeProvider.when("url",{
templateUrl: '',
controller: ''
}).otherwise({
redirectTo : 'url'
})
}
);
如果這不夠使的,可以學(xué)習(xí)一下ui-router:https://github.com/angular-ui/ui-router,這個功能強大一些。

Peter_Zhu

ANGULAR SPA + JERSEY + SPRINGMVC 整合應(yīng)用 這篇講的很清楚

http://www.liaozhida.net/angular/angular-spa-jersey-springmvc-%E6%95%B4%E5%90%88%E5%BA%94%E7%94%A8.html

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板