feat(upgrade): use ComponentFactory.inputs/outputs/ngContentSelectors
DEPRECATION: - the arguments `inputs` / `outputs` / `ngContentSelectors` of `downgradeComponent` are no longer used as Angular calculates these automatically now. - Compiler.getNgContentSelectors is deprecated. Use ComponentFactory.ngContentSelectors instead.
This commit is contained in:

committed by
Chuck Jazdzewski

parent
1171f91a80
commit
a3e32fb7e1
@ -145,12 +145,7 @@ ng1AppModule.factory('heroesService', downgradeInjectable(HeroesService));
|
||||
|
||||
// #docregion ng2-heroes-wrapper
|
||||
// This is directive will act as the interface to the "downgraded" Angular component
|
||||
ng1AppModule.directive(
|
||||
'ng2Heroes',
|
||||
downgradeComponent(
|
||||
// The inputs and outputs here must match the relevant names of the properties on the
|
||||
// "downgraded" component
|
||||
{component: Ng2HeroesComponent, inputs: ['heroes'], outputs: ['addHero', 'removeHero']}));
|
||||
ng1AppModule.directive('ng2Heroes', downgradeComponent({component: Ng2HeroesComponent}));
|
||||
// #enddocregion
|
||||
|
||||
// #docregion example-app
|
||||
|
Reference in New Issue
Block a user