change HeroDetailComponent to HeroDetailDirective

This commit is contained in:
Filipe Silva 2016-11-10 15:27:45 +00:00
parent c7487be4a2
commit 16c1837feb
6 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static';
import { heroDetail, HeroDetailComponent } from './hero-detail.component'; import { heroDetail, HeroDetailDirective } from './hero-detail.component';
import { ContainerComponent } from './container.component'; import { ContainerComponent } from './container.component';
// #docregion heroupgrade // #docregion heroupgrade
@ -15,7 +15,7 @@ import { ContainerComponent } from './container.component';
], ],
declarations: [ declarations: [
ContainerComponent, ContainerComponent,
HeroDetailComponent HeroDetailDirective
], ],
entryComponents: [ entryComponents: [
ContainerComponent ContainerComponent

View File

@ -18,7 +18,7 @@ import { Hero } from '../hero';
@Directive({ @Directive({
selector: 'hero-detail' selector: 'hero-detail'
}) })
export class HeroDetailComponent extends UpgradeComponent { export class HeroDetailDirective extends UpgradeComponent {
@Input() hero: Hero; @Input() hero: Hero;
constructor(elementRef: ElementRef, injector: Injector) { constructor(elementRef: ElementRef, injector: Injector) {

View File

@ -4,7 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static';
import { heroDetail, HeroDetailComponent } from './hero-detail.component'; import { heroDetail, HeroDetailDirective } from './hero-detail.component';
import { ContainerComponent } from './container.component'; import { ContainerComponent } from './container.component';
// #docregion heroupgrade // #docregion heroupgrade
@ -15,7 +15,7 @@ import { ContainerComponent } from './container.component';
], ],
declarations: [ declarations: [
ContainerComponent, ContainerComponent,
HeroDetailComponent HeroDetailDirective
], ],
entryComponents: [ entryComponents: [
ContainerComponent ContainerComponent

View File

@ -23,7 +23,7 @@ import { Hero } from '../hero';
@Directive({ @Directive({
selector: 'hero-detail' selector: 'hero-detail'
}) })
export class HeroDetailComponent extends UpgradeComponent { export class HeroDetailDirective extends UpgradeComponent {
@Input() hero: Hero; @Input() hero: Hero;
@Output() deleted: EventEmitter<Hero>; @Output() deleted: EventEmitter<Hero>;

View File

@ -4,7 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static';
import { heroDetail, HeroDetailComponent } from './hero-detail.component'; import { heroDetail, HeroDetailDirective } from './hero-detail.component';
import { ContainerComponent } from './container.component'; import { ContainerComponent } from './container.component';
// #docregion heroupgrade // #docregion heroupgrade
@ -15,7 +15,7 @@ import { ContainerComponent } from './container.component';
], ],
declarations: [ declarations: [
ContainerComponent, ContainerComponent,
HeroDetailComponent HeroDetailDirective
], ],
entryComponents: [ entryComponents: [
ContainerComponent ContainerComponent

View File

@ -15,7 +15,7 @@ import { UpgradeComponent } from '@angular/upgrade/static';
@Directive({ @Directive({
selector: 'hero-detail' selector: 'hero-detail'
}) })
export class HeroDetailComponent extends UpgradeComponent { export class HeroDetailDirective extends UpgradeComponent {
constructor(elementRef: ElementRef, injector: Injector) { constructor(elementRef: ElementRef, injector: Injector) {
super('heroDetail', elementRef, injector); super('heroDetail', elementRef, injector);
} }