例如,如何恢复us_firstname
存储在我的对象中LocalStorage
?
studentInfos() {
this.eleveService.apiGetEleveInfo(this.token, this.us_id)
.subscribe((data: any) => {
this.student = data.results[0]
localStorage.setItem("student", JSON.stringify(data));
console.log('student', this.student)
})
}
const student = JSON.parse(localstorage.getItem("student"))[0]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句