angular/packages/core/schematics/migrations/remove-module-id
Paul Gschwendtner 605c536420 feat(core): add migration to remove moduleId references (#49496)
Removes all `moduleId:` property references in `@Directive` and
`@Component`.

PR Close #49496
2023-03-24 10:27:10 -07:00
..
BUILD.bazel feat(core): add migration to remove moduleId references (#49496) 2023-03-24 10:27:10 -07:00
index.ts feat(core): add migration to remove moduleId references (#49496) 2023-03-24 10:27:10 -07:00
README.md feat(core): add migration to remove moduleId references (#49496) 2023-03-24 10:27:10 -07:00

RemoveModuleId migration

As of Angular version 9, the moduleId property has no effect. This migration removes the field from all @Directive or @Component decorators.

Before

@Component({
  moduleId: <..>,
  template: 'Works',
})
export class MyComponent {}

After

@Component({
  template: 'Works',
})
export class MyComponent {}