docs(cheatsheet): copy edit bootstrapping.md (#11149)
Also remove Dart-specific code, since the Dart cheatsheet is produced from dart-lang/angular2.
This commit is contained in:
parent
d53a898f46
commit
8cb1046ce9
|
@ -4,11 +4,10 @@ Bootstrapping
|
||||||
@description
|
@description
|
||||||
{@target ts}`import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';`{@endtarget}
|
{@target ts}`import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';`{@endtarget}
|
||||||
{@target js}Available from the `ng.platformBrowserDynamic` namespace{@endtarget}
|
{@target js}Available from the `ng.platformBrowserDynamic` namespace{@endtarget}
|
||||||
{@target dart}`import 'package:angular2/platform/browser.dart';`{@endtarget}
|
|
||||||
|
|
||||||
@cheatsheetItem
|
@cheatsheetItem
|
||||||
syntax(ts dart):
|
syntax(ts):
|
||||||
`platformBrowserDynamic().bootstrapModule(MyAppModule);`|`platformBrowserDynamic().bootstrapModule`
|
`platformBrowserDynamic().bootstrapModule(AppModule);`|`platformBrowserDynamic().bootstrapModule`
|
||||||
syntax(js):
|
syntax(js):
|
||||||
`document.addEventListener('DOMContentLoaded', function() {
|
`document.addEventListener('DOMContentLoaded', function() {
|
||||||
ng.platformBrowserDynamic
|
ng.platformBrowserDynamic
|
||||||
|
@ -16,4 +15,4 @@ syntax(js):
|
||||||
.bootstrapModule(app.AppModule);
|
.bootstrapModule(app.AppModule);
|
||||||
});`|`platformBrowserDynamic().bootstrapModule`
|
});`|`platformBrowserDynamic().bootstrapModule`
|
||||||
description:
|
description:
|
||||||
Bootstraps an application defined as AppModule ng module using the Just in Time compiler.{@target js}Must be wrapped in the event listener to fire when the page loads.{@endtarget}
|
Bootstraps the app, using the root component from the specified `NgModule`. {@target js}Must be wrapped in the event listener to fire when the page loads.{@endtarget}
|
||||||
|
|
Loading…
Reference in New Issue