-1

I have developed one sample page using angular js.

Just i add comments in textbox and submit, I will add the values in scope variable and display the content in same page using ng repeater, It's working fine but if i open the same page in another window, the old results only displayed,Current scope variable not updated any idea?

1 Answers1

1

You cannot retain the scope of your Angular application in another window. The scope is tied only to the window in which the ngApp is initialized.

In order to overcome this, you can use the LocalStorage of your browser.

EDIT: Please refer this

But in your case, you will have to use a DB or such which will need a backend server too. The MEAN stack is a very nice stack to work on with Angular as the front with Expressjs to connect with Nodejs as the backend along with MongoDB

Community
  • 1
  • 1
v1shnu
  • 2,211
  • 8
  • 39
  • 68