1: The Hero Editor
authorKai Moritz <kai@juplo.de>
Fri, 1 May 2020 17:10:20 +0000 (19:10 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 1 May 2020 17:10:20 +0000 (19:10 +0200)
a) ng generate component heroes

src/app/app.module.ts
src/app/heroes/heroes.component.css [new file with mode: 0644]
src/app/heroes/heroes.component.html [new file with mode: 0644]
src/app/heroes/heroes.component.spec.ts [new file with mode: 0644]
src/app/heroes/heroes.component.ts [new file with mode: 0644]

index f657163..40ad7e6 100644 (file)
@@ -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 (file)
index 0000000..e69de29
diff --git a/src/app/heroes/heroes.component.html b/src/app/heroes/heroes.component.html
new file mode 100644 (file)
index 0000000..ef2a0c4
--- /dev/null
@@ -0,0 +1 @@
+<p>heroes works!</p>
diff --git a/src/app/heroes/heroes.component.spec.ts b/src/app/heroes/heroes.component.spec.ts
new file mode 100644 (file)
index 0000000..66518e4
--- /dev/null
@@ -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<HeroesComponent>;
+
+  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 (file)
index 0000000..8d9f662
--- /dev/null
@@ -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() {
+  }
+
+}