docs(beta-4): update quickstart ts to include typings
This commit is contained in:
parent
37a13330df
commit
91551e8a35
|
@ -1,4 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
|
///<reference path="../node_modules/angular2/typings/browser.d.ts"/>
|
||||||
import {bootstrap} from 'angular2/platform/browser'
|
import {bootstrap} from 'angular2/platform/browser'
|
||||||
// #docregion app-component
|
// #docregion app-component
|
||||||
import {AppComponent} from './app.component'
|
import {AppComponent} from './app.component'
|
||||||
|
|
|
@ -203,12 +203,15 @@ code-example(format="").
|
||||||
+makeExample('quickstart/ts/app/main.ts', null, 'app/main.ts')(format=".")
|
+makeExample('quickstart/ts/app/main.ts', null, 'app/main.ts')(format=".")
|
||||||
:marked
|
:marked
|
||||||
We need two things to launch the application:
|
We need two things to launch the application:
|
||||||
|
|
||||||
1. Angular's browser `bootstrap` function
|
1. Angular's browser `bootstrap` function
|
||||||
1. The application root component that we just wrote.
|
1. The application root component that we just wrote.
|
||||||
|
|
||||||
We import both. Then we call `bootstrap`, passing in the **root component type**,
|
We import both. Then we call `bootstrap`, passing in the **root component type**,
|
||||||
`AppComponent`.
|
`AppComponent`.
|
||||||
|
|
||||||
|
The `<reference>` tag tells TypeScript how to find the typings for browser shims used by Angular.
|
||||||
|
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
:marked
|
:marked
|
||||||
Learn why we import `bootstrap` from `angular2/platform/browser`
|
Learn why we import `bootstrap` from `angular2/platform/browser`
|
||||||
|
|
Loading…
Reference in New Issue