此刻,我把手Ember.js无效的路线是这样的:如何处理无效的路由没有斜杠Ember.js
this.route('invalid', { path: '*path' }
这工作,并适用于类似的路线:
https://www.appname.com/#/misspelled_name
但是,使用Dropbox Datastores API时,我遇到了一些问题。认证请求后,Dropbox重定向到:
https://www.appname.com/#access_token=...
有没有办法处理这条路线?路线名称前没有斜杠?在这种情况下,“无效”路线未应用,并且收到错误“路线access_token = ...未找到”。我应该如何在Ember中处理这个响应?
UPDATE
我不认为这是可能的处理这个问题。对我来说唯一的工作解决方案是在Ember被加载之前进行身份验证。认证成功后,我打开我的烬的应用程序:
window.dropboxClient = new Dropbox.Client({
key: 'some_key'
});
dropboxClient.authenticate({ interactive: true }, function(error) {
if (error) {
return console.log('Error during authentication');
}
});
yepnope([{
test : window.dropboxClient.isAuthenticated(),
yep : ['my-ember-app.js']
}])
你有没有解决过这个问题?我有'#_ = _'的Facebook身份验证重定向网址的问题。 – Spundun