Last active
June 27, 2022 08:57
-
-
Save NyaGarcia/96dc6554ba14697982d9ecbfcda5a601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { MatDialog } from '@angular/material/dialog'; | |
import { Observable } from 'rxjs'; | |
import { PokedexFirestoreService } from 'src/app/core/pokedex-firestore.service'; | |
import { Pokemon } from './interfaces/pokemon.interface'; | |
@Component({ | |
selector: 'app-pokemon', | |
templateUrl: './pokemon.component.html', | |
styleUrls: ['./pokemon.component.scss'], | |
}) | |
export class PokemonComponent implements OnInit { | |
pokemon$: Observable<Pokemon[]>; | |
selectedPokemon: Pokemon; | |
constructor( | |
private readonly pokedexService: PokedexFirestoreService, | |
private readonly dialog: MatDialog | |
) {} | |
ngOnInit(): void { | |
this.pokemon$ = this.pokedexService.getAll(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment