From 1a5f159a2259b9bc8546e1450b7b53f90c7625dd Mon Sep 17 00:00:00 2001 From: "DESKTOP-P9VU163\\admin" Date: Tue, 17 Jun 2025 17:26:51 +0300 Subject: [PATCH] The hero editor add Create the heroes component --- src/app/app.component.html | 338 +-------------------------- src/app/app.component.ts | 5 +- src/app/heroes/heroes.component.css | 0 src/app/heroes/heroes.component.html | 1 + src/app/heroes/heroes.component.ts | 12 + 5 files changed, 18 insertions(+), 338 deletions(-) create mode 100644 src/app/heroes/heroes.component.css create mode 100644 src/app/heroes/heroes.component.html create mode 100644 src/app/heroes/heroes.component.ts diff --git a/src/app/app.component.html b/src/app/app.component.html index bf2da11..a6988be 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,336 +1,2 @@ - - - - - - - - - - - -
-
-
- -

{{ title }}

-

Congratulations! Your app is running. 🎉

-
- -
-
- @for (item of [ - { title: 'Explore the Docs', link: 'https://angular.dev' }, - { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, - { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, - { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, - { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, - ]; track item.title) { - - {{ item.title }} - - - - - } -
- -
-
-
- - - - - - - - - - - +

{{title}}

+ \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 40edeea..17be7b6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,11 +1,12 @@ import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; +import { HeroesComponent } from "./heroes/heroes.component"; @Component({ selector: 'app-root', - imports: [RouterOutlet], templateUrl: './app.component.html', - styleUrl: './app.component.css' + styleUrl: './app.component.css', + imports: [HeroesComponent] }) export class App { protected title = 'Tour of Heroes'; diff --git a/src/app/heroes/heroes.component.css b/src/app/heroes/heroes.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/heroes/heroes.component.html b/src/app/heroes/heroes.component.html new file mode 100644 index 0000000..e37b264 --- /dev/null +++ b/src/app/heroes/heroes.component.html @@ -0,0 +1 @@ +

{{hero}}

\ No newline at end of file diff --git a/src/app/heroes/heroes.component.ts b/src/app/heroes/heroes.component.ts new file mode 100644 index 0000000..c329855 --- /dev/null +++ b/src/app/heroes/heroes.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + + +@Component({ + selector: 'app-heroes', + templateUrl: './heroes.component.html', + styleUrl: './heroes.component.css' +}) + +export class HeroesComponent { + hero = 'Windstorm'; +}