2015-11-05 07:33:56 -05:00
@cheatsheetSection
2015-11-06 07:26:24 -05:00
Bootstrapping
@cheatsheetIndex 0
2015-11-05 07:33:56 -05:00
@description
2016-08-08 20:18:50 -04:00
{@target ts}`import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';`{@endtarget}
{@target js}Available from the `ng.platformBrowser` namespace{@endtarget}
2016-03-17 15:49:46 -04:00
{@target dart}`import 'package:angular2/platform/browser.dart';`{@endtarget}
2015-11-05 07:33:56 -05:00
@cheatsheetItem
2015-12-12 22:17:26 -05:00
syntax(ts dart):
2016-08-08 20:18:50 -04:00
`platformBrowserDynamic().bootstrapModule(MyAppModule);` |`platformBrowserDynamic().bootstrapModule`
2015-12-12 22:17:26 -05:00
syntax(js):
`document.addEventListener('DOMContentLoaded', function () {
2016-08-08 20:18:50 -04:00
ng.platformBrowser.platformBrowserDynamic().bootstrapModuleDynamic(MyAppModule);`|`platformBrowserDynamic().bootstrapModule`
2015-12-09 07:33:42 -05:00
description:
2016-08-08 20:18:50 -04:00
Bootstraps an application defined as MyAppModule ng module using the Just in Time compiler.{@target js}Must be wrapped in the event listener to fire when the page loads.{@endtarget}