更新时间:2023-11-17 11:34:34
Angular.js 只能在一个页面上工作和保存数据.如果您的页面重新加载(正如您在说express.js 加载下一页"时似乎表明的那样),那么它会重新初始化所有内容.
Angular.js only works and keeps data on a single page. If your page reloads (as you seem to indicate when you say "express.js loads the next page", then it reinitialized everything.
你应该:
localstorage
.了解更多:http://diveintohtml5.info/storage.html
localstorage
. Find out more: http://diveintohtml5.info/storage.html