Created
October 10, 2018 14:38
-
-
Save LayZeeDK/c179e807b2c7daa09e2ee3a33b30f10f to your computer and use it in GitHub Desktop.
Heroes: Mixed component model after extracting a container component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { Hero } from '../hero'; | |
@Component({ | |
selector: 'app-heroes', | |
templateUrl: './heroes.component.html', | |
styleUrls: ['./heroes.component.css'] | |
}) | |
export class HeroesComponent { | |
heroes: Hero[]; | |
add(name: string): void { | |
name = name.trim(); | |
if (!name) { return; } | |
} | |
delete(hero: Hero): void {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment