-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request(ng g c): add option to include generated component in module exports list #3778
Comments
I tried to give this a go but came across this: blueprints/component/index.js // ...
if(options.export) {
returns.push(
astUtils.addExportToModule(this.pathToModule, className, importPath)
.then(change => change.apply(NodeHost)));
} ast-utils.ts export function addExportToModule(modulePath: string, classifiedName: string,
importPath: string): Promise<Change> {
return _addSymbolToNgModuleMetadata(modulePath, 'exports', classifiedName, importPath);
} generates:
As you can see |
@baruchvlz thanks for taking a look, I'm about to start implementing this, I will keep you posted. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Please consider add following feature option when generating a component:
With a option, say
--add-to-exports
, we can runng g c parent/shall-be-exported --add-to-exports
, and get shallBeExportedComponent in the exports list of parentModule.The text was updated successfully, but these errors were encountered: