change HeroDetailComponent to HeroDetailDirective
This commit is contained in:
parent
c7487be4a2
commit
16c1837feb
|
@ -4,7 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|||
import { BrowserModule } from '@angular/platform-browser';
|
||||
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';
|
||||
|
||||
// #docregion heroupgrade
|
||||
|
@ -15,7 +15,7 @@ import { ContainerComponent } from './container.component';
|
|||
],
|
||||
declarations: [
|
||||
ContainerComponent,
|
||||
HeroDetailComponent
|
||||
HeroDetailDirective
|
||||
],
|
||||
entryComponents: [
|
||||
ContainerComponent
|
||||
|
|
|
@ -18,7 +18,7 @@ import { Hero } from '../hero';
|
|||
@Directive({
|
||||
selector: 'hero-detail'
|
||||
})
|
||||
export class HeroDetailComponent extends UpgradeComponent {
|
||||
export class HeroDetailDirective extends UpgradeComponent {
|
||||
@Input() hero: Hero;
|
||||
|
||||
constructor(elementRef: ElementRef, injector: Injector) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|||
import { BrowserModule } from '@angular/platform-browser';
|
||||
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';
|
||||
|
||||
// #docregion heroupgrade
|
||||
|
@ -15,7 +15,7 @@ import { ContainerComponent } from './container.component';
|
|||
],
|
||||
declarations: [
|
||||
ContainerComponent,
|
||||
HeroDetailComponent
|
||||
HeroDetailDirective
|
||||
],
|
||||
entryComponents: [
|
||||
ContainerComponent
|
||||
|
|
|
@ -23,7 +23,7 @@ import { Hero } from '../hero';
|
|||
@Directive({
|
||||
selector: 'hero-detail'
|
||||
})
|
||||
export class HeroDetailComponent extends UpgradeComponent {
|
||||
export class HeroDetailDirective extends UpgradeComponent {
|
||||
@Input() hero: Hero;
|
||||
@Output() deleted: EventEmitter<Hero>;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|||
import { BrowserModule } from '@angular/platform-browser';
|
||||
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';
|
||||
|
||||
// #docregion heroupgrade
|
||||
|
@ -15,7 +15,7 @@ import { ContainerComponent } from './container.component';
|
|||
],
|
||||
declarations: [
|
||||
ContainerComponent,
|
||||
HeroDetailComponent
|
||||
HeroDetailDirective
|
||||
],
|
||||
entryComponents: [
|
||||
ContainerComponent
|
||||
|
|
|
@ -15,7 +15,7 @@ import { UpgradeComponent } from '@angular/upgrade/static';
|
|||
@Directive({
|
||||
selector: 'hero-detail'
|
||||
})
|
||||
export class HeroDetailComponent extends UpgradeComponent {
|
||||
export class HeroDetailDirective extends UpgradeComponent {
|
||||
constructor(elementRef: ElementRef, injector: Injector) {
|
||||
super('heroDetail', elementRef, injector);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue