When using angular standalone components(v16), how to implement exports similar to @NgModule, which can combine import/export components?
Just like the NzMenu component in ng-zorro-antd.Use multiple components to complete a function. ng-zorro-antd.
@NgModule({
imports: [BidiModule, CommonModule, PlatformModule, OverlayModule, NzIconModule, NzNoAnimationModule, NzOutletModule],
declarations: [
NzMenuDirective,
NzMenuItemComponent,
NzSubMenuComponent,
NzMenuDividerDirective,
NzMenuGroupComponent,
NzSubMenuTitleComponent,
NzSubmenuInlineChildComponent,
NzSubmenuNoneInlineChildComponent
],
exports: [NzMenuDirective, NzMenuItemComponent, NzSubMenuComponent, NzMenuDividerDirective, NzMenuGroupComponent]
})
export class NzMenuModule {}
Angular officially only describes how to combine imports in ngModule Standalone components for library authors.
Such an array could be imported by applications using NgModules and added to the @NgModule.imports.
I would like to ask how to achieve the same effect without using ngModule?