docs(beta-4): update quickstart ts to include typings

This commit is contained in:
Naomi Black 2016-02-10 14:58:05 -08:00
parent 37a13330df
commit 91551e8a35
2 changed files with 5 additions and 1 deletions

View File

@ -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'

View File

@ -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`