Se pueden ver eventos desde usuario cliente. Hay código (algo) duplicado
This commit is contained in:
@@ -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}}
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user