| 298 | }) |
| 299 | export class BrowserModule { |
| 300 | constructor() { |
| 301 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 302 | const providersAlreadyPresent = inject(BROWSER_MODULE_PROVIDERS_MARKER, { |
| 303 | optional: true, |
| 304 | skipSelf: true, |
| 305 | }); |
| 306 | |
| 307 | if (providersAlreadyPresent) { |
| 308 | throw new RuntimeError( |
| 309 | RuntimeErrorCode.BROWSER_MODULE_ALREADY_LOADED, |
| 310 | `Providers from the \`BrowserModule\` have already been loaded. If you need access ` + |
| 311 | `to common directives such as NgIf and NgFor, import the \`CommonModule\` instead.`, |
| 312 | ); |
| 313 | } |
| 314 | } |
| 315 | } |
| 316 | } |