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