Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tr *ngFor="let row of itemList; let i = index">
- <!--mostrar los datos-->
- </tr>
- newItem() {
- this.itemService.insertMockItemData().subscribe(
- (resp) => {
- if (resp.created) {
- // vuelve a pedir los items para el usuario y los carga en el array
- this.loadItemList(resp.user.email);
- }
- },
- (error) => {
- console.log('Error');
- // tratamos el error correspondientemente
- }
- );
- }
- insertMockItemData() {
- return this.http.post<any>(`${environment.apiURL}path/topost/item`, {
- "id": "item",
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement