Se pueden ver eventos desde usuario cliente. Hay código (algo) duplicado

This commit is contained in:
2021-05-12 18:16:12 +02:00
parent 277ad1d88a
commit 4aa238ab9e
11 changed files with 136 additions and 2 deletions

View File

@@ -18,7 +18,6 @@
{{evento.fecha}} ·
<ion-icon name="cash-outline"></ion-icon>
{{evento.precio1}},{{evento.precio2}}
<ion-button (click)="editarEvento(evento);$event.stopPropagation();"><ion-icon name="pencil-outline"></ion-icon></ion-button>
</div>
<div class="eventoDesc">
{{evento.descripcion}}

View File

@@ -1,6 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Eventoi } from '../interfaces/eventoi';
import { FeedService } from '../services/feed.service';
import { Tab1Service } from '../tab1/tab1.service';
@Component({
selector: 'app-feed',
@@ -11,10 +13,15 @@ export class FeedPage implements OnInit {
eventos: Eventoi[];
constructor(private feedService:FeedService) { }
constructor(private feedService:FeedService, private tab1Service: Tab1Service, private router:Router ) { }
ngOnInit() {
this.eventos = this.feedService.eventos;
}
mostrarEvento(evento: Eventoi){
this.feedService.eventoIndex = this.eventos.indexOf(evento);
this.router.navigate(['/tabs/tab2/view-evento-cliente']);
}
}