当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript platform-browser.browserPlatform函数代码示例

本文整理汇总了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);
}
开发者ID:Trendy,项目名称:angular,代码行数:9,代码来源:platform_browser_dynamic.ts

示例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);
  }

}
开发者ID:StephenFluin,项目名称:compiler-bundling-demo,代码行数:13,代码来源:bootstrap-static.ts

示例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);
开发者ID:BharatBhatiya,项目名称:test,代码行数:9,代码来源:bootstrap.ts

示例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);
开发者ID:jeffbcross,项目名称:closure-compiler-angular-bundling,代码行数:9,代码来源:bootstrap.ts

示例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);

开发者ID:jthoms1,项目名称:tree-shake-ionic2,代码行数:11,代码来源:main.ts

示例6: browserPlatform

import {browserPlatform} from '@angular/platform-browser';

import {NgWeatherAppModuleNgFactory} from './module.ngfactory';

browserPlatform().bootstrapModuleFactory(NgWeatherAppModuleNgFactory);
开发者ID:angular,项目名称:mobile-codelab,代码行数:5,代码来源:main.ts

示例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);
开发者ID:laco0416,项目名称:angular2-tour-of-heroes,代码行数:10,代码来源:bootstrap-static.ts


注:本文中的@angular/platform-browser.browserPlatform函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。