angular/packages/core/schematics/migrations/entry-components
Kristiyan Kostadinov e65a245a0b feat(core): add migration to remove entryComponents (#44322)
Adds an automated migration that will drop any usages of `entryComponents` from `@NgModule` and `@Component`.

PR Close #44322
2021-12-01 12:03:14 -08:00
..
BUILD.bazel feat(core): add migration to remove entryComponents (#44322) 2021-12-01 12:03:14 -08:00
index.ts feat(core): add migration to remove entryComponents (#44322) 2021-12-01 12:03:14 -08:00
README.md feat(core): add migration to remove entryComponents (#44322) 2021-12-01 12:03:14 -08:00
util.ts feat(core): add migration to remove entryComponents (#44322) 2021-12-01 12:03:14 -08:00

entryComponents migration

As of Angular version 13, the entryComponents option in @NgModule and @Component isn't necessary anymore. This migration will automatically remove any usages.

Before

import { NgModule, Component } from '@angular/core';

@Component({selector: 'my-comp', template: ''})
export class MyComp {}

@NgModule({
  declarations: [MyComp],
  entryComponents: [MyComp],
  exports: [MyComp]
})
export class MyModule {}

After

import { NgModule, Component } from '@angular/core';

@Component({selector: 'my-comp', template: ''})
export class MyComp {}

@NgModule({
  declarations: [MyComp],
  exports: [MyComp]
})
export class MyModule {}