Skip to content

Commit

Permalink
Merge pull request #253 from SoCreate/fix-zone-issue
Browse files Browse the repository at this point in the history
Fix zone issue
  • Loading branch information
lurock committed Mar 25, 2020
2 parents 3690646 + e504348 commit 1ffd50f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 7.0.2 (2020-3-25)

<a name="7.0.2"></a>

### Bug Fixes
* **scenario loading:** Fix issue with zone error introduced in 7.0.1

# 7.0.1 (2020-3-25)

<a name="7.0.1"></a>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-playground",
"version": "7.0.1",
"version": "7.0.2",
"description": "A drop in app module for working on Angular components in isolation (aka Scenario Driven Development).",
"typings": "dist/playground/angular-playground.d.ts",
"main": "dist/playground/bundles/angular-playground.umd.js",
Expand Down
28 changes: 14 additions & 14 deletions projects/playground/src/lib/core/scenario/scenario.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ export class ScenarioComponent implements OnInit, OnChanges, OnDestroy {
}

// Don't bootstrap a new Angular application within an existing zone
// this.zone.runOutsideAngular(() => {
const module = this.createModule(sandbox, scenario);
platformBrowserDynamic().bootstrapModule(module)
.then(app => {
this.activeApps.push(app);
resetCompiledComponents();
(window as any).isPlaygroundComponentLoaded = () => true;
})
.catch(err => {
resetCompiledComponents();
(window as any).isPlaygroundComponentLoadedWithErrors = () => true;
console.error(err);
});
// });
this.zone.runOutsideAngular(() => {
const module = this.createModule(sandbox, scenario);
platformBrowserDynamic().bootstrapModule(module)
.then(app => {
this.activeApps.push(app);
resetCompiledComponents();
(window as any).isPlaygroundComponentLoaded = () => true;
})
.catch(err => {
resetCompiledComponents();
(window as any).isPlaygroundComponentLoadedWithErrors = () => true;
console.error(err);
});
});
}
}
});
Expand Down

0 comments on commit 1ffd50f

Please sign in to comment.