How do i add remember me functionality in ionic app?

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!'
        });
    });
}

})

this plugin will help you: https://github.com/gsklee/ngStorage