function OkCtrl($scope, $http) {
  
  $scope.userAnswer = localStorage.userAnswer;
  $scope.validAnswer = localStorage.validAnswer.toUpperCase();

  $scope.goHome = function(){
  	 window.location.href = '#/home';
  }
  
  if( navigator.onLine ) { 
    $.ajax({
          url : 'http://dailes.w.pw/update_actives',
          data : { tokenUser : localStorage.userToken, dailyActives : localStorage.activeDailies },
          type : 'POST',
          dataType : 'json',
          error : function(jqXHR, status, error) {
              console.log('Disculpe, existió un problema');
          },
          complete : function(jqXHR, status) {
              console.log('Petición realizada');
          }
    });
  }
 
    
   $scope.time = moment().format('h:mm');
   $scope.seconds = moment().format('ss');

    setInterval(
      function(){
        $scope.time = moment().format('h:mm');
        $scope.seconds = moment().format('ss');
        $scope.$apply();
      }, 1000
    );


}

