25 lines
832 B
TypeScript
25 lines
832 B
TypeScript
|
import { NgModule } from '@angular/core';
|
||
|
import { CommonModule } from '@angular/common';
|
||
|
|
||
|
import { BorderCardDirective } from './border-card.directive';
|
||
|
import { PokemonTypeColorPipe } from './pokemon-type-color.pipe';
|
||
|
import { ListPokemonComponent } from './list-pokemon/list-pokemon.component';
|
||
|
import { DetailPokemonComponent } from './detail-pokemon/detail-pokemon.component';
|
||
|
import { RouterModule, Routes } from '@angular/router';
|
||
|
|
||
|
const pokemonRoutes: Routes = [
|
||
|
{ path: 'pokemons', component: ListPokemonComponent },
|
||
|
{ path: 'pokemon/:id', component: DetailPokemonComponent },
|
||
|
];
|
||
|
|
||
|
@NgModule({
|
||
|
declarations: [
|
||
|
BorderCardDirective,
|
||
|
PokemonTypeColorPipe,
|
||
|
ListPokemonComponent,
|
||
|
DetailPokemonComponent,
|
||
|
],
|
||
|
imports: [CommonModule, RouterModule.forChild(pokemonRoutes)],
|
||
|
})
|
||
|
export class PokemonModule {}
|