forgot to stop the angular interval after changing path

This commit is contained in:
Brad Rydzewski 2014-07-10 22:41:11 -07:00
parent 799e80c97a
commit 3a6ce5b5e1

View file

@ -1,10 +1,10 @@
'use strict';
angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, users) {
$interval(function() {
var stop = $interval(function() {
// todo(bradrydzewski) We should poll the user to see
// if the sync process is complete. If no, we should
// repeat.
// if the sync process is complete.
$interval.cancel(stop);
$location.path("/");
}, 5000);
});