本文整理匯總了TypeScript中ng-metadata/platform-browser-dynamic.bootstrap函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript bootstrap函數的具體用法?TypeScript bootstrap怎麽用?TypeScript bootstrap使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了bootstrap函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: enableProdMode
import { bootstrap } from "ng-metadata/platform-browser-dynamic";
import * as uiRouter from "angular-ui-router";
import { AppComponent } from "./app/app.component";
import { provideState } from "./app.routes";
import { enableProdMode } from "ng-metadata/core";
if ( ENV === "production" ) {
enableProdMode();
}
bootstrap( AppComponent, [uiRouter, provideState]);
示例2: enableProdMode
import { bootstrap } from 'ng-metadata/platform-browser-dynamic';
import { enableProdMode } from 'ng-metadata/core';
import { AppComponent } from './app';
if ( ENV === 'production' ) {
enableProdMode();
}
bootstrap( AppComponent, [] );
示例3: bootstrap
//main entry point
import { bootstrap, Title } from 'ng-metadata/platform-browser-dynamic';
import { AsyncPipe } from 'ng-metadata/common';
import { enableProdMode } from 'ng-metadata/core';
import { AppComponent } from './app.component';
import { AppModule, configureProviders } from './index';
// enableProdMode();
bootstrap( AppComponent, [ Title, AsyncPipe, AppModule, configureProviders ] );
示例4: enableProdMode
import { bootstrap } from 'ng-metadata/platform-browser-dynamic';
import { enableProdMode } from 'ng-metadata/core';
import { AppComponent } from './app';
import * as ngMaterial from 'angular-material';
if ( ENV === 'production' ) {
enableProdMode();
}
bootstrap( AppComponent, [ ngMaterial ] );
示例5: enableProdMode
import { bootstrap } from 'ng-metadata/platform-browser-dynamic';
import { enableProdMode } from 'ng-metadata/core';
import { AppComponent } from './app';
import { THIRD_PARTY_MODULES, APP_INITIALIZERS, APP_PROVIDERS, APP_PIPES } from './app/app.dependencies';
if (ENV === 'production') {
enableProdMode();
}
// bootstraps the angular using the AppComponent as the Root Component
bootstrap(AppComponent, [
...THIRD_PARTY_MODULES,
...APP_INITIALIZERS,
...APP_PROVIDERS,
...APP_PIPES
]);