angular ui router url will not change when the view changes. How to make the url of the page change with it? Urgent Urgent````
曾经蜡笔没有小新2017-05-15 16:55:11
I have been looking for a long time but haven’t found a good method. I use window.location.href = ''
ringa_lee2017-05-15 16:55:11
ui.router
When the view changes, that means the state changes
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' }); });