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
Post a Comment