From b9527a5cd012df19c71953671e4fc4c24e91e9e4 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 1 May 2020 19:10:20 +0200 Subject: [PATCH] 1: The Hero Editor a) ng generate component heroes --- src/app/app.module.ts | 4 +++- src/app/heroes/heroes.component.css | 0 src/app/heroes/heroes.component.html | 1 + src/app/heroes/heroes.component.spec.ts | 25 +++++++++++++++++++++++++ src/app/heroes/heroes.component.ts | 15 +++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) 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.spec.ts create mode 100644 src/app/heroes/heroes.component.ts 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() { + } + +} -- 2.20.1