2016-06-01 12 views

答えて

1

電子メールとパスワードのフィールドにng-modelsがある場合は、スコープ内の変数をクリーンアップすることができます。

HTML:

<input ng-model="email"> 
<input type="password" ng-model="password"> 

JS:

$scope.email = ''; 
$scope.password = ''; 
+0

さて、jsはあなたのログアウト機能の中に入るべきです –

+0

Juaninありがとうございますそれはうまく動作します – udaya

+0

あなたは大歓迎です。 –

0

履歴のクリアの詳細については、この

$scope.logOut = function(){ 
    console.log('invoking logout function'); 
    $ionicHistory.clearCache().then(function() { 
     //now you can clear history or goto another state if you need 
     $ionicHistory.clearHistory(); 
     $ionicHistory.clearCache(); 
     $ionicHistory.nextViewOptions({ disableBack: true, historyRoot: true });    
    }); 
    }; 

を試してみてくださいthisを参照してください。

ideaを提供するこの質問をチェックしてください。

関連する問題