Search code examples
angularjsonsen-ui

how to store login information using onsen ui?


I want to use onsen ui and angularjs to develop a hybird application, but now I meet a problem, this application cannot store user's login information, so user must login everytime after they close the application.

I use $cookies, service, and $rootScope to store user's login information, but all of them can not work at android platform.

Anyone can help me to solve this problem?


Solution

  • On HTML5 mobile framework like Onsenui, I suggest to use localStorage.

    You can take a look at these two AngularJs modules:

    They have very well written instructions and demo codes as references.