Shared variables in two different html

Hi, I have two html, login and home, each with its controller. The login.html is loaded first, which use two variables, email and password. How do I share with the home.html? In other words, they are accessible at home immediately and updated? Obviously, the two html are loaded at different times. Thank you

Hi, try to create a service, and save the data in the localStorage, or if you go directly to the home after the login, you can pass it via navParam :wink:

even you can use $rootscope as

$rootscope.email = "a@b.com"
$rootscope.passwordv-v"abcd1234";

Thank you very much !

Thank you very much, it´s working!