Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

How do i add remember me functionality in ionic app?

$
0
0

@andy87 wrote:

My Login controller

.controller('LoginCtrl', function($scope, LoginService, $ionicPopup, $state, $cookies, $rootScope) {
$scope.data = {};

$scope.create = function () {
    $state.go('signup');
}

$scope.forgot = function () {
    $state.go('forgotpassword');
}

$scope.login = function () {

    LoginService.loginUser($scope.data.user_email, $scope.data.password).success(function (data) {
        var wat = $rootScope.session;
        console.log(wat);
        $state.go('app.dashboard');
    }).error(function (data) {
        var alertPopup = $ionicPopup.alert({
            title: 'Login failed!',
            template: 'Please check your credentials!'
        });
    });
}

})

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>