-
Notifications
You must be signed in to change notification settings - Fork 21
Labels
v10📦 componentsRelated to the @swisspost/design-system-components packageRelated to the @swisspost/design-system-components package📦 components-angularRelated to the @swisspost/design-system-components-angular packageRelated to the @swisspost/design-system-components-angular package
Milestone
Description
Stencil is currently generating Angular components as non-standalone, which is no longer the recommended approach. Angular now encourages the use of standalone components, and our package should adapt accordingly.
Tasks
- Update Angular dependencies following the Angular Update Guide in the
components-angularpackage (ng ...commands can also be run withnpx @angular/cli ...). - Update the output type for Angular components in the
componentspackage to usestandalone - Build both the
componentsandcomponents-angularpackages, in that order - Convert
components-angular/projects/components/src/lib/components.module.tsinto a provider (see example below) - Replace the
PostComponentsModuleimport with the new provider in the main file of the consumer app - Start the consumer app of
components-angularand verify that the Angular components work as expected
📦 Library Providers Example
// library.providers.ts
import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';
import { provideEnvironmentInitializer } from '@angular/core';
export function provideLibrary(): EnvironmentProviders {
return makeEnvironmentProviders([
provideEnvironmentInitializer({
provide: 'env-init',
multi: true,
useValue: () => {
// Your init logic here
console.log('Library initialized');
},
}),
// Other providers if necessary
]);
}Metadata
Metadata
Assignees
Labels
v10📦 componentsRelated to the @swisspost/design-system-components packageRelated to the @swisspost/design-system-components package📦 components-angularRelated to the @swisspost/design-system-components-angular packageRelated to the @swisspost/design-system-components-angular package
Type
Projects
Status
🚀 Done