From c097c0144c58cac685cf7297b199ad35c0b7cfa3 Mon Sep 17 00:00:00 2001 From: Kam Date: Fri, 11 Sep 2026 13:13:44 +0300 Subject: [PATCH] docs: import bootstrapApplication from platform-browser in the CSP example The `CSP_NONCE` example in the security guide imports `bootstrapApplication` from `@angular/core`, which does not export it, so copying the snippet fails with "has no exported member named 'bootstrapApplication'". It is exported from `@angular/platform-browser`, which is where every other example in the docs imports it from. Keep `CSP_NONCE` on `@angular/core` and import `bootstrapApplication` from `@angular/platform-browser`. --- adev/src/content/guide/security.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adev/src/content/guide/security.md b/adev/src/content/guide/security.md index 1a21c9c05f7..e0893ee70c6 100644 --- a/adev/src/content/guide/security.md +++ b/adev/src/content/guide/security.md @@ -155,7 +155,8 @@ You can set the nonce for Angular in one of the following ways: 1. Provide the nonce using the `CSP_NONCE` injection token. Use this approach if you have access to the nonce at runtime and you want to be able to cache the `index.html`. ```ts -import {bootstrapApplication, CSP_NONCE} from '@angular/core'; +import {CSP_NONCE} from '@angular/core'; +import {bootstrapApplication} from '@angular/platform-browser'; import {AppComponent} from './app/app.component'; bootstrapApplication(AppComponent, {