discofy inicial

This commit is contained in:
2021-01-18 14:01:50 +01:00
commit 5f48a57c6f
152 changed files with 17101 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import { Injectable, OnInit } from '@angular/core';
import { stringify } from 'querystring';
import { Tab1Page } from './tab1.page'
import { Discoteca } from '../discoteca'
import { Galeria } from '../galeria';
import { Evento } from '../evento';
@Injectable({
providedIn: 'root'
})
export class Tab1Service implements OnInit{
discoteca: Discoteca;
galeria: Galeria;
eventos: Evento[];
constructor() {
}
ngOnInit(){
this.initValues();
}
initValues(): void{
this.discoteca = new Discoteca();
this.discoteca.setNombre('Barraca');
this.discoteca.setTelefono(666666666);
this.discoteca.setLocalizacion('Calle del Barquillo');
this.galeria = new Galeria();
this.galeria.setDiscoteca(this.discoteca.getNombre());
}
getNombre(): string{
this.initValues();
return this.discoteca.getNombre();
}
getTelefono(): number{
this.initValues();
return this.discoteca.getTelefono();
}
getLocalizacion(): string{
this.initValues();
return this.discoteca.getLocalizacion();
}
getEventos(): Evento[]{
return this.discoteca.getEventos();
}
}