angular
令人着迷的夜晚
这个作者很懒,什么都没留下…
展开
-
如何在外部中获取异步函数中的数据
getData(pageIndex, this.pageSizeSpec){return new Promise((resolve,reject)=>{…resolve(this.goodsSpecValueList);})}// this.getData(pageIndex, this.pageSizeSpec);// this.getDataCallback(pageInd...原创 2020-04-01 15:48:28 · 865 阅读 · 0 评论 -
JSON.stringfy(str)和JSON.parse(str)
JSON.stringfy(str)是将js对象转换成json对象;JSON.parse(str)是反过来将json对象转换成js对象;补充:angular的本地缓存用法:localStorage.setItem(‘time’,JSON.stringfy(time));var time=JSON.parse(localStorage.getItem(time));...原创 2020-03-30 15:47:15 · 266 阅读 · 0 评论 -
登录和token
*****login.component.tspublic pwdSubmit() {this.pwdSubmitted = true;console.log(this.f.identity.value);console.log(this.f.password.value);this.auth.login(this.f.identity.value, this.f.password.va...原创 2020-03-27 09:57:35 · 687 阅读 · 0 评论