mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(docs-infra): reset sandbox runtime on template change (#59844)
Ensure the sandbox runtime is properly reset when the template changes to prevent any unexpected behavior during development. PR Close #59844
This commit is contained in:
parent
b592b1b051
commit
951155eb4c
1 changed files with 1 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ export default class PlaygroundComponent implements AfterViewInit {
|
|||
async changeTemplate(template: PlaygroundTemplate): Promise<void> {
|
||||
this.selectedTemplate = template;
|
||||
await this.loadTemplate(template.path);
|
||||
await this.nodeRuntimeSandbox!.reset();
|
||||
}
|
||||
|
||||
private async loadTemplate(tutorialPath: string) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue