- Create a new angular project:
ng new- Add nonce to app-root as explained here: https://angular.io/guide/security#content-security-policy
We use a dummy value for nonce just for testing, for example:
<!-- src/index.html -->
<app-root ngCspNonce="123"></app-root>- Add a stylesheet link to head, for example:
<!-- src/index.html -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />- Build and see error message
npm run build
# Index html generation failed.
# link.prev?.setAttribute is not a function