SHARE
TWEET

Untitled

a guest Mar 20th, 2016 25 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. angular.module('watchApp').controller('loginController', ['$scope', function ($scope) {
  2.     $scope.users = users;
  3.     var loggedIn = false;
  4.  
  5.     $scope.logIn = function (e) {
  6.         for (var i = 0; i < $scope.users.length; i++)
  7.         {
  8.             if ($scope.users[i].user == e.user && $scope.users[i].password == e.password) {
  9.                 console.log('works!')
  10.                 loggedIn = true;
  11.             }
  12.             else {
  13.                 console.log('doesnt!')
  14.             }
  15.         }
  16.     }
  17. }]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top