本文整理汇总了TypeScript中@angular/platform/browser.bootstrap函数的典型用法代码示例。如果您正苦于以下问题:TypeScript bootstrap函数的具体用法?TypeScript bootstrap怎么用?TypeScript bootstrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bootstrap函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: enableProdMode
import {bootstrap} from '@angular/platform/browser';
import {enableProdMode} from '@angular/core';
import {HTTP_PROVIDERS} from '@angular/http';
import {ROUTER_PROVIDERS} from '@angular/router';
if (webpack.ENV === 'production') {
enableProdMode();
}
import {MyApp} from './app/app';
bootstrap(MyApp, [
...HTTP_PROVIDERS,
...ROUTER_PROVIDERS
]).catch(console.error.bind(console));
示例2: bootstrap
import { bootstrap } from '@angular/platform/browser';
import { provide } from '@angular/core';
import { HTTP_PROVIDERS } from '@angular/http';
import { MyApp } from './app';
import {TRANSLATE_PROVIDERS, TranslateService,TranslateStaticLoader,TranslateLoader} from "ng2-translate/ng2-translate";
bootstrap(MyApp, [
HTTP_PROVIDERS,
TRANSLATE_PROVIDERS
]);
示例3: bootstrap
import {bootstrap} from '@angular/platform/browser';
import {enableProdMode} from '@angular/core';
import {AppComponent} from './app.component';
// enableProdMode();
bootstrap(AppComponent);
示例4: bootstrap
import {bootstrap} from '@angular/platform/browser';
import {HTTP_PROVIDERS} from '@angular/http';
import {ROUTER_PROVIDERS} from '@angular/router';
import {MyApp} from './components/app';
bootstrap(MyApp, [
...HTTP_PROVIDERS, // using spread operator
...ROUTER_PROVIDERS
]).catch((console) => console.error(console));