diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index adf0474a08a3..ce966eb0f778 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -183,6 +183,10 @@ const moduleSchematic: RuleFactory = createProjectSchematic( path: options.path, project: options.project, standalone: false, + // The route templates reference the component by its default file and class name, so the + // component must not inherit a `type` or `exportDefault` from the workspace. + type: '', + exportDefault: false, }; return chain([