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 { 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
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>;
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue