Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public webdesign: Array<WebDesign>;
- loadMore() : void
- {
- this.apollo.query(`{
- getWebDesignList (page : ${this.page++}) {
- _id
- title
- description
- creatorName
- createdAt
- }
- }`).subscribe(r => {
- r.data.getWebDesignList.forEach(e => this.webdesign.push(e));
- //TypeError: Cannot add property 2, object is not extensible
- });
- }
- let temp = JSON.parse(JSON.stringify(this.webdesign));
- for (let i = 0; i < r.data.getWebDesignList.length; i++) {
- temp.push(r.data.getWebDesignList[i]);
- }
- this.webdesign = temp;
Add Comment
Please, Sign In to add comment