From: Kai Moritz Date: Fri, 1 May 2020 17:10:20 +0000 (+0200) Subject: 1: The Hero Editor X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b9527a5cd012df19c71953671e4fc4c24e91e9e4;p=examples%2Fangular-tour-of-heroes 1: The Hero Editor a) ng generate component heroes --- diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f657163..40ad7e6 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,10 +2,12 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; +import { HeroesComponent } from './heroes/heroes.component'; @NgModule({ declarations: [ - AppComponent + AppComponent, + HeroesComponent ], imports: [ BrowserModule 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..ef2a0c4 --- /dev/null +++ b/src/app/heroes/heroes.component.html @@ -0,0 +1 @@ +

heroes works!

diff --git a/src/app/heroes/heroes.component.spec.ts b/src/app/heroes/heroes.component.spec.ts new file mode 100644 index 0000000..66518e4 --- /dev/null +++ b/src/app/heroes/heroes.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeroesComponent } from './heroes.component'; + +describe('HeroesComponent', () => { + let component: HeroesComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HeroesComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HeroesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/heroes/heroes.component.ts b/src/app/heroes/heroes.component.ts new file mode 100644 index 0000000..8d9f662 --- /dev/null +++ b/src/app/heroes/heroes.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-heroes', + templateUrl: './heroes.component.html', + styleUrls: ['./heroes.component.css'] +}) +export class HeroesComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +}