You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Allow standalone components to export other components to be accessed from within.
Proposed solution
@Component({standalone: true,selector: 'app-tab-group',exports: [TabComponent],// export `app-tab` to be accessed as a child of `app-tab-group`
...
})exportclassTabGroupComponent{}
@Component({standalone: true,selector: 'app-my-component',imports: [TabGroupComponent],// only import TabGroup and TabComponent will come alongtemplate: ` <app-tab-group> <app-tab>Tab 1</app-tab> <app-tab>Tab 2</app-tab> <app-tab>Tab 3</app-tab> </app-tab-group> `})exportclassMyComponent{}
In this way, TabGroupComponent would act as a module and you won't need to import TabComponent every time you want to use them.
Alternatives considered
The alternative is to create a module and export both components, but you will still be chained to ng modules. And if you import both components all the time you need them, your imports list gets enormous.
The text was updated successfully, but these errors were encountered:
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Allow standalone components to export other components to be accessed from within.
Proposed solution
In this way,
TabGroupComponent
would act as a module and you won't need to importTabComponent
every time you want to use them.Alternatives considered
The alternative is to create a module and export both components, but you will still be chained to ng modules. And if you import both components all the time you need them, your
imports
list gets enormous.The text was updated successfully, but these errors were encountered: