SHARE
TWEET

Untitled

a guest Jun 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top