# Conflicts: # public/docs/_examples/dependency-injection/ts/app/main.1.ts # public/docs/ts/latest/guide/dependency-injection.jade
14 lines
384 B
TypeScript
14 lines
384 B
TypeScript
import { bootstrap } from '@angular/platform-browser-dynamic';
|
|
import { AppComponent } from './app.component.1';
|
|
import { HeroService } from './heroes/hero.service.1';
|
|
|
|
bootstrap(AppComponent);
|
|
|
|
function discouraged() {
|
|
//#docregion bootstrap
|
|
bootstrap(AppComponent,
|
|
[HeroService]); // DISCOURAGED (but works)不推荐(但可用)
|
|
//#enddocregion bootstrap
|
|
}
|
|
|