我正在尝试使用 google api 对用户进行身份验证,但参数中的返回数据在破坏服务器的 token 中包含一个 DOT,如果我删除 DOT,它基本上会请求另一个不存在的页面它完美地工作很好。
这是示例网址
http://localhost:9000/developer/auth/google?code=4/ubXcE1qq84XFtsAwT00_BWkLKR9RldGk6zhBS8ZSiTw.El_qMeir0J0coiIBeO6P2m_ee_B7kwI
这是状态处理器
.state('/developer/auth/google', {
url: '/developer/auth/google?code',
templateUrl: 'views/developer/auth/google.html',
controller: 'DeveloperAuthGoogleCtrl',
resolve: {
code: function($stateParams) {
return $stateParams.code;
}
}
})
谢谢
最佳答案
我遇到了同样的问题。
我修复了将重写规则更改为节点服务器的问题。现在我可以在任何参数上使用 DOT
检查这个重写规则:
modRewrite(['!\\.html|\\.js|\\.svg|\\.css|\\.png$ /index.html [L]'])
关于javascript - AngularJS UI-Router 使用 DOT 处理 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26974192/