离子:注销按钮在twitter弹出后停止工作

时间:2016-04-28 08:20:27

标签: javascript angularjs ionic-framework

我的app中有twitter分享按钮。

与Twitter共享(弹出窗口)甚至取消后,我的一个按钮 - 注销按钮停止工作。

按钮非常简单:

<ion-item ng-click="vm.gotoMyRewards()" class="item">
    <span class="item-icon"><i class="fa fa-shopping-cart"></i></span>
    <span class="item-text ng-binding">My Rewards</span>
</ion-item>
<ion-item ng-click="vm.gotoMyPoints()" class="item">
    <span class="item-icon"><i class="icon ion-stats-bars"></i></span>
    <span class="item-text ng-binding">My Points</span>
</ion-item>
<ion-item ng-click="vm.gotoPartnerCenter()" ng-show="vm.user.IsMerchant" class="item ng-hide" style="">
    <span class="item-icon"><i class="fa fa-shopping-cart"></i></span>
    <span class="item-text ng-binding">Partner Centre</span>
</ion-item>
<ion-item ng-click="vm.gotoSettings()" class="item">
    <span class="item-icon"><i class="fa fa-cog"></i></span>
    <span class="item-text ng-binding">Settings</span>
</ion-item>
<!-- ngIf: vm.user.BugReportEnabled -->

<ion-item menu-close="" ng-click="vm.takeUserGuide()" class="item">
    <span class="item-icon"><i class="icon ion-easel"></i></span>
    <span class="item-text ng-binding">About</span>
</ion-item>

<ion-item menu-close="" ng-click="vm.openFAQ()" class="item">
    <span class="item-icon"><i class="fa fa-life-ring"></i></span>
    <span class="item-text ng-binding">Help</span>
</ion-item>

<ion-item ng-click="vm.signOut()" class="item">
    <span class="item-icon"><i class="fa fa-power-off"></i></span>
    <span class="item-text ng-binding">Log Out</span>
</ion-item>

最后一个不起作用。并没有触发后面的行动:

vm.signOut = function () {
    var confirmCallback = function(index){
        //OK
        if(index == 2){
            appStateFactory.logOut();
        }
    };
    messageService.confirm("Sign_out_confirm_message", [translate.get('Cancel_MA'), 'OK'], confirmCallback);
};

0 个答案:

没有答案