mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: fix programmatic-rendering example (#59768)
Fixes example of programmatically rendering of components using dynamic import, as calling dynamic import returns module namespace object rather than component instance PR Close #59768
This commit is contained in:
committed by
Alex Rickabaugh
parent
f179dc5cef
commit
67db7f7147
@@ -117,10 +117,11 @@ JavaScript [dynamic import](https://developer.mozilla.org/docs/Web/JavaScript/Re
|
||||
`
|
||||
})
|
||||
export class AdminSettings {
|
||||
advancedSettings: {new(): AdminSettings} | undefined;
|
||||
advancedSettings: {new(): AdvancedSettings} | undefined;
|
||||
|
||||
async loadAdvanced() {
|
||||
this.advancedSettings = await import('path/to/advanced_settings.js');
|
||||
const { AdvancedSettings } = await import('path/to/advanced_settings.js');
|
||||
this.advancedSettings = AdvancedSettings;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user