Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
The Design System Angular Components, ready for use in your Angular project.
| Version | Angular |
|---|---|
| 9.x | 19.x || 20.x |
| 8.x | 18.x |
| 7.x | 16.x || 17.x |
| 2.x | 16.x |
| 1.x | 16.x |
npm install @swisspost/design-system-components-angular
Importing the components to your project.
// app.module.ts import { NgModule } from '@angular/core'; import { PostComponentsModule } from '@swisspost/design-system-components-angular'; @NgModule({ ... imports: [PostComponentsModule], ... }) export class AppModule {}
Usage within your template.
<!-- app.component.html --> <post-icon *ngIf="condition" [attr.name]="iconName"></post-icon>
Angular components use inline scripts and styles.
To enable their execution while enforcing a strict Content Security Policy (CSP), you can use a CSP nonce.
A nonce is a randomly generated word or phrase intended for one-time use, which must update with each HTTP response.
Inline scripts or styles with a nonce attribute matching the current nonce value set in the CSP will execute properly, while others will be blocked.
Learn more in the CSP nonce documentation.
There are two ways to configure Angular to automatically set nonce attributes:
ngCspNonce attribute on the root application element.CSP_NONCE injection token.This configuration will also apply automatically to components in the Components for Angular package. For more details, refer to the Angular security guide.