Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


how to cache login data angularjs


how to cache login data angularjs  using -'javascript,angularjs,http,caching,login'

I have recently attempted to create a login page that when the user logs in, a pop-up box appears asking them if they want to save their credentials. And if yes then the next time the user goes onto the login page, the ID & Password are already filled out. Plus the pop-up is never seen again unless they're a new user. Can someone show me how to cache the login data?

JS:

//Check login credentials against db
          $http.post('http://178.32.64.76:8765/login', {
            IDNumber: $scope.login.IDnumber,
            password: $scope.login.password
          })
          .then(function(response) {
            $scope.status = response.status;
              var confirmPopup = $ionicPopup.confirm({
                template: 'Do you want to save your login credentials?',
                okText: 'Yes',
                cancelText: 'No'
              });

              confirmPopup.then(function(popupResponse) {
                if (popupResponse) {
                //Caching code will go here

              }

              $state.go('tab.dash');
              });


Input:

<input name="IDnumber" type="text" placeholder="ID Number"
ng-model="login.IDnumber" ng-minlength="10" ng-maxlength="10" numbers-only required>

<input name="password" type="password" placeholder="Password"
ng-model="login.password" required>

    

asked Oct 13, 2015 by manju bhargava
0 votes
10 views



Related Hot Questions



Government Jobs Opening


...