当我点击我的电子邮件中的链接到我的网站时,例如:
http://example.com/step1?code=1234
我的代码将显示在网址中,然后在进入我的控制器之前立即消失。
.state('step1', {
url: '/step1?code',
templateUrl: templateDir + 'step1.html',
controller: 'Step1Controller'
})
有没有任何方法可以保留我的查询字符串并通过$stateParams
获取它?
答案 0 :(得分:0)
尝试
.state('step1', {
url: '/step1/:code',
templateUrl: templateDir + 'step1.html',
controller: 'Step1Controller'
})