angular-cn/modules/angular2/docs/cheatsheet/bootstrapping.md

10 lines
289 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@cheatsheetSection
Bootstrapping
@cheatsheetIndex 0
@description
`import {bootstrap} from 'angular2/angular2';`
@cheatsheetItem
`bootstrap(MyAppComponent, [MyService, provide(...)]);`
Bootstraps an application with MyAppComponent as the root component and configures the DI providers.