0
由于这个应用程序的目的是在没有服务器支持的情况下运行,而且我正在使用Angular,所以我无法捕获隐式的oauth标记,因为Angular不会容忍URL中的第二个hashbang(#)。如何在隐式oauth中使用angular来获取instagram访问令牌?
的Instagram被重定向用户返回到http://127.0.0.1:8080/#/oauth/#access_token=TOKEN和角度自动重定向的回http://127.0.0.1:8080/#/
我的代码路径:
app.config(function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'templates/index/index.html',
controller: 'IndexController',
controllerAs: 'index'
})
.when('/oauth/:token', {
templateUrl: 'templates/oauth/index.html',
controller: 'OAuthController',
controllerAs: 'oauth'
});
.otherwise({
redirectTo: '/'
});
});
有没有办法角数字出来之前,我可以删除#或迫使角忽略 #?