javascript - Need to store Objects, so that on refresh, the object should be available in angularJS? -


i have service implemented. , i'm creating 2 objects. after refresh values becoming null.

how should store these objects, can access them after refresh also.

var userpool = new awscognito.cognitoidentityserviceprovider.cognitouserpool(xyz); var cognitouser = awscognito.authenticate(userpool); 

this implemented in service, run once. need store these objects, can access them after refresh.

for data persistence within app, services should used.

for data persistence within browser, localstorage should used.

read localstorage: https://developer.mozilla.org/en/docs/web/api/window/localstorage

an angular library localstorage: https://npmjs.com/package/angular-local-storage


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -