2016-08-05 8 views
-1

ボタンを経過時間で更新しようとしています。私はタイマーをログコンソール、一度ボタンのラベルを更新し、それが時間の経過とともに更新していないですができます。タイマの角度更新ボタン

<button ng-show="location" class="button button-large assertive icon  {{buttonIcon}} button-block" ng-click="record()"> 
    {{buttonLabel}} 
</button> 

    $scope.buttonLabel = "stop"; 
    $scope.recordParams.timer = $interval(function(){ 
     var time = getTimeElapsed(initialTime); 
     $scope.buttonLabel = time; 
    }, 100); 

それは「停止」に変更されますが、私はそれは時間で更新することができません。

答えて

0

コントローラから$ intervalを逃した

+0

あなたの問題を解決したらうれしいです。次回はコントローラの宣言全体を投稿してください。 –

関連する問題