Skip to content

Commit

Permalink
fix(angular): add --module option to component generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Apr 5, 2022
1 parent 12f0f19 commit 098c837
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/generated/packages/angular.json
Expand Up @@ -291,6 +291,11 @@
"default": "Default",
"alias": "c"
},
"module": {
"type": "string",
"description": "The filename or path to the NgModule that will declare this component.",
"alias": "m"
},
"style": {
"description": "The file extension or preprocessor to use for style files, or `none` to skip generating the style file.",
"type": "string",
Expand Down
2 changes: 0 additions & 2 deletions packages/angular/src/generators/component/component.ts
Expand Up @@ -7,7 +7,6 @@ import {
readProjectConfiguration,
normalizePath,
} from '@nrwl/devkit';
import { normalize } from 'path';
import { pathStartsWith } from '../utils/path';

export async function componentGenerator(tree: Tree, schema: Schema) {
Expand All @@ -19,7 +18,6 @@ export async function componentGenerator(tree: Tree, schema: Schema) {
);
await angularComponentSchematic(tree, {
...schema,
skipImport: true,
});

exportComponent(tree, schema);
Expand Down
1 change: 1 addition & 0 deletions packages/angular/src/generators/component/schema.d.ts
Expand Up @@ -12,6 +12,7 @@ export interface Schema {
type?: string;
flat?: boolean;
selector?: string;
module?: string;
skipSelector?: boolean;
export?: boolean;
}
5 changes: 5 additions & 0 deletions packages/angular/src/generators/component/schema.json
Expand Up @@ -60,6 +60,11 @@
"default": "Default",
"alias": "c"
},
"module": {
"type": "string",
"description": "The filename or path to the NgModule that will declare this component.",
"alias": "m"
},
"style": {
"description": "The file extension or preprocessor to use for style files, or `none` to skip generating the style file.",
"type": "string",
Expand Down

0 comments on commit 098c837

Please sign in to comment.