0
我正在构建一个网站,其中的帐户页面是一个Angular.js单页面应用程序。所以一个普通的观点将有像localhost:3000/account#/info
使用Angular UI路由器处理传统URL
现在说我必须使角处理URL像localhost:3000/account/?param=value
,我应该如何设置路由器? (我使用的UI路由器)
我想是这样
$stateProvider.state('my-page', {
url: '',
controller: 'MyPageController'
})
,但它不工作。 (它只检测localhost:3000/account?param=value
通知在account
后缺少正斜杠)
有没有人有任何想法?谢谢。
有意义,但如果路由器甚至没有调用MyPageController,那么'$ window.location.search'应该在哪里? – melonccoli