javascript - Where is rootScope values are stored? In cookie or local storage? -
this question has answer here:
where rootscope
values stored? in cookie or local storage?
i have small doubt rootscope
in angularjs
.
i have passing value between 2 controllers, have using
$rootscope
.
i want know how
rootscope
working? ,rootscope
data stored?in
local storage
orcookie
or else?
when switching controllers (or routes or states) in angularjs what's inside controller closure destroyed, outside of not. $rootscope
service instantiated once on page when switch controllers not destroyed. that's why it's persistent. if reload whole page (hit [f5] in browser) in lost.
this fundamental whole single page application pattern.
if the sources service won't find related cross-page persistence.
Comments
Post a Comment