ng-pokemon-app/src/app/pokemon/pokemon.module.ts

25 lines
832 B
TypeScript
Raw Normal View History

2023-02-24 13:54:17 +00:00
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 {}