當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。