在我看來吳單擊角JS不起作用
<button type="button"
ng-disabled="isProcessing"
ng-click="login.ssoFacebook()"
class="button button-primary">
<span class="icon icon-social-facebook"></span>
Login Using Facebook
</button>
當我點擊按鈕,Facebook並沒有工作 我控制器
this.ssoFacebook = function(){
// intiate
ssoAuth.facebook.initiate()
.then(function(customer){
if (!customer) throw 'error system';
authService.setCurrentSession(customer, $scope);
$timeout(function() {
$scope.$emit(GLOBAL_EVENTS.SYSTEM.ACCOUNT.SESSION.LOGIN_SUCCESS);
}, 500);
// redirect or something
$state.go('products', {}, {reload: true});
})
.catch(function(error){
$scope.$emit(GLOBAL_EVENTS.SYSTEM.ACCOUNT.SESSION.LOGIN_FAILED, error);
});
};
難道我做錯了什麼?感謝推進
你是什麼意思不工作?請顯示完整控制器的代碼。 – Kamo
你可以發佈一些更多的代碼?包括你的控制器的定義請 – yarons
@Kamo它不顯示彈出Facebook認證,這是我的完整代碼控制器[http://plnkr.co/edit/qMI6v34lDklhQmnKvoDs?p=catalogue] – innonx