-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(angular): do not wrap bootstrap call when setting up ssr in works…
…paces with angular >= 15.2.0 (#16714)
- Loading branch information
1 parent
68c262d
commit ae89df9
Showing
6 changed files
with
70 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
packages/angular/src/generators/setup-ssr/files/base/src/main.ts__tpl__
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
packages/angular/src/generators/setup-ssr/files/pre-v15-2/src/main.ts__tpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
import { AppModule } from './app/app.module'; | ||
|
||
function bootstrap() { | ||
platformBrowserDynamic() | ||
.bootstrapModule(AppModule) | ||
.catch((err) => console.error(err)); | ||
} | ||
|
||
if (document.readyState !== 'loading') { | ||
bootstrap(); | ||
} else { | ||
document.addEventListener('DOMContentLoaded', bootstrap); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters