angualr ui router 如何改变url
angular ui router 当视图改变的时候url不会变,怎么让页面的url跟着一起变,急急急````
FCSMio
10 years, 2 months ago
Answers
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' }); });
DPZ-LMZ
answered 10 years, 2 months ago