Angularjs - How to store array data for using in every controllers

119 Views Asked by At

When I logged in my page, server send me some data including array like 'user_info', 'user_token' and 'user_auth'.

And I store them into $cookieStore.

But I got one problem that length of 'user_auth' is too large to store into $cookieStore.

Logs have shown to me messages like below.

Cookie 'user_auth' possibly not set or overflowed because it was too large (5251 > 4096 bytes)!

I used $cacheFactory also, but I think this is not proper to my purpose.

How can I handle this 'user_auth' array for using every controllers without effected by page refreshing?

Thanks in advance. :)

0

There are 0 best solutions below