angular services - AngularJS need to store userdata , should be available to entire application -


i need store userdata, should available entire application, should accessible required controllers, after searching found few options store.

  • using service controllers
  • $sessionstorage
  • $localstorage

of above u please tell me best practice? or there other solution other above 3.

using simple google search might have told lot best thing? there no single best thing it's depends upon use case.

services best way interchange data between controllers. if don't want persist data(if data don't want there if page reloaded) can use service, if want persist data can use localstorage.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -