angular ui router 當視圖改變的時候url不會變,怎麼讓頁的url跟著一起變,急急急````
ringa_lee2017-05-15 16:55:11
ui.router
視圖改變,那就是state改變咯
js
.config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider .otherwise('/players?pagenum=1'); $stateProvider .state('players', { url: '/players?pagenum', templateUrl: 'tpls/players.html' }) .state('details', { url: '/details?playerId', templateUrl: 'tpls/details.html' }); });