From 80c0236f5e0a97c39372c27923978b7ff0b2ed88 Mon Sep 17 00:00:00 2001 From: "DESKTOP-P9VU163\\admin" Date: Wed, 25 Jun 2025 11:46:40 +0300 Subject: [PATCH] add new value for repair cod /hero-detail.component.ts --- src/app/app.routes.ts | 2 +- src/app/dashboard/dashboard.component.ts | 3 ++- src/app/hero-search/hero-search.component.html | 2 +- src/app/hero-search/hero-search.component.ts | 17 +++++------------ 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 16dea5b..c4d056a 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -7,7 +7,7 @@ export const routes: Routes = [ { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, //путь по умолчанию { path: 'heroes', component: HeroesComponent }, - { path: 'dashboard', component: DashboardComponent }, + { path: 'dashboard', component: DashboardComponent }, { path: 'detail/:id', component: HeroDetailComponent }, ]; diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index ce9692c..54f028d 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -3,10 +3,11 @@ import { Component, OnInit } from '@angular/core'; import { Hero } from '../hero'; import { HeroService } from '../hero.service'; import { RouterLink } from '@angular/router'; +import { HeroSearchComponent } from "../hero-search/hero-search.component"; @Component({ selector: 'app-dashboard.component', - imports: [CommonModule, RouterLink], + imports: [CommonModule, RouterLink, HeroSearchComponent], templateUrl: './dashboard.component.html', styleUrl: './dashboard.component.css' }) diff --git a/src/app/hero-search/hero-search.component.html b/src/app/hero-search/hero-search.component.html index cee79d7..a0c632f 100644 --- a/src/app/hero-search/hero-search.component.html +++ b/src/app/hero-search/hero-search.component.html @@ -1,7 +1,7 @@
- +