本文整理汇总了TypeScript中@angular/platform-browser.browserPlatform函数的典型用法代码示例。如果您正苦于以下问题:TypeScript browserPlatform函数的具体用法?TypeScript browserPlatform怎么用?TypeScript browserPlatform使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了browserPlatform函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: bootstrap
export function bootstrap(
appComponentType: Type,
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef<any>> {
reflector.reflectionCapabilities = new ReflectionCapabilities();
var appInjector = ReflectiveInjector.resolveAndCreate(
[BROWSER_APP_DYNAMIC_PROVIDERS, isPresent(customProviders) ? customProviders : []],
browserPlatform().injector);
return coreLoadAndBootstrap(appInjector, appComponentType);
}
示例2: createCustomBootstrapper
export function createCustomBootstrapper(customProviders?:any[]){
let providers = [
BROWSER_APP_PROVIDERS,
customProviders ? customProviders : []
];
var appInjector = ReflectiveInjector.resolveAndCreate(providers, browserPlatform().injector);
return function bootstrap(componentFactory) {
return coreBootstrap(componentFactory, appInjector);
}
}
示例3: browserPlatform
import {ReflectiveInjector, coreBootstrap} from '@angular/core';
import {BROWSER_APP_PROVIDERS, browserPlatform} from '@angular/platform-browser';
import {Basic} from './basic';
import {BasicNgFactory} from './basic.ngfactory';
const appInjector =
ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS, browserPlatform().injector);
coreBootstrap(BasicNgFactory, appInjector);
示例4: browserPlatform
import {coreBootstrap, ReflectiveInjector} from '@angular/core';
import {browserPlatform, BROWSER_APP_COMMON_PROVIDERS} from '@angular/platform-browser';
import {BasicNgFactory} from './basic.ngfactory';
import {Basic} from './basic';
const appInjector =
ReflectiveInjector
.resolveAndCreate(BROWSER_APP_COMMON_PROVIDERS, browserPlatform().injector);
coreBootstrap(appInjector, BasicNgFactory);
示例5: ionicProviders
import {ComponentResolver, ReflectiveInjector, coreBootstrap} from '@angular/core';
import {BROWSER_APP_PROVIDERS, browserPlatform} from '@angular/platform-browser';
import {ionicProviders, ionicPostBootstrap} from 'ionic-angular';
import {AppNgFactory} from './app/app.ngfactory';
const providers = ionicProviders();
const appInjector = ReflectiveInjector.resolveAndCreate([BROWSER_APP_PROVIDERS, []], browserPlatform().injector);
const ngComponentRef = coreBootstrap(AppNgFactory, appInjector);
//ionicPostBootstrap(ngComponentRef);
示例6: browserPlatform
import {browserPlatform} from '@angular/platform-browser';
import {NgWeatherAppModuleNgFactory} from './module.ngfactory';
browserPlatform().bootstrapModuleFactory(NgWeatherAppModuleNgFactory);
示例7: enableProdMode
import 'core-js/shim';
import 'zone.js/dist/zone';
import {browserPlatform} from '@angular/platform-browser';
import {enableProdMode} from '@angular/core';
import {MainModuleNgFactory} from './main.module.ngfactory';
enableProdMode();
browserPlatform().bootstrapModuleFactory(MainModuleNgFactory);