aboutsummaryrefslogtreecommitdiff
path: root/src/app/heroes
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/heroes')
-rw-r--r--src/app/heroes/heroes.component.html4
-rw-r--r--src/app/heroes/heroes.component.scss0
-rw-r--r--src/app/heroes/heroes.component.spec.ts25
-rw-r--r--src/app/heroes/heroes.component.ts20
4 files changed, 49 insertions, 0 deletions
diff --git a/src/app/heroes/heroes.component.html b/src/app/heroes/heroes.component.html
new file mode 100644
index 0000000..0bc287b
--- /dev/null
+++ b/src/app/heroes/heroes.component.html
@@ -0,0 +1,4 @@
1{{hero.name | uppercase}} Details <br>id: {{hero.id}}<br>name: {{hero.name}}
2<br>
3<br>
4<input [(ngModel)]="hero.name" placeholder="name">
diff --git a/src/app/heroes/heroes.component.scss b/src/app/heroes/heroes.component.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/app/heroes/heroes.component.scss
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 @@
1import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
3import { HeroesComponent } from './heroes.component';
4
5describe('HeroesComponent', () => {
6 let component: HeroesComponent;
7 let fixture: ComponentFixture<HeroesComponent>;
8
9 beforeEach(async(() => {
10 TestBed.configureTestingModule({
11 declarations: [ HeroesComponent ]
12 })
13 .compileComponents();
14 }));
15
16 beforeEach(() => {
17 fixture = TestBed.createComponent(HeroesComponent);
18 component = fixture.componentInstance;
19 fixture.detectChanges();
20 });
21
22 it('should create', () => {
23 expect(component).toBeTruthy();
24 });
25});
diff --git a/src/app/heroes/heroes.component.ts b/src/app/heroes/heroes.component.ts
new file mode 100644
index 0000000..0f72ae9
--- /dev/null
+++ b/src/app/heroes/heroes.component.ts
@@ -0,0 +1,20 @@
1import { Component, OnInit } from '@angular/core';
2import { Hero } from '../hero';
3
4@Component({
5 selector: 'app-heroes',
6 templateUrl: './heroes.component.html',
7 styleUrls: ['./heroes.component.scss']
8})
9export class HeroesComponent implements OnInit {
10 hero: Hero ={
11 id: 1,
12 name: 'Windstorm'
13 };
14
15 constructor() { }
16
17 ngOnInit() {
18 }
19
20}