Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <tr *ngFor="let row of itemList; let i = index">
  2. <!--mostrar los datos-->
  3. </tr>
  4.  
  5. newItem() {
  6. this.itemService.insertMockItemData().subscribe(
  7. (resp) => {
  8. if (resp.created) {
  9. // vuelve a pedir los items para el usuario y los carga en el array
  10. this.loadItemList(resp.user.email);
  11. }
  12. },
  13. (error) => {
  14. console.log('Error');
  15. // tratamos el error correspondientemente
  16. }
  17. );
  18. }
  19.  
  20. insertMockItemData() {
  21.  
  22. return this.http.post<any>(`${environment.apiURL}path/topost/item`, {
  23. "id": "item",
  24. });
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement