本文整理汇总了TypeScript中angular2-universal-preview.bootstrap函数的典型用法代码示例。如果您正苦于以下问题:TypeScript bootstrap函数的具体用法?TypeScript bootstrap怎么用?TypeScript bootstrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bootstrap函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: bootstrap
export function bootstrap(appComponentType: any, appProviders: Array<Type | Provider | any | any[]> = []): Promise<ComponentRef> {
let combinedProviders = [
IOT_PROVIDERS,
...appProviders
];
return bootstrapUniversal(appComponentType, combinedProviders);
}
开发者ID:QuinntyneBrown,项目名称:angular2-iot,代码行数:7,代码来源:index.ts
示例2: bootstrap
// import {bootstrap} from 'angular2/platform/browser';
import {bootstrap} from 'angular2-universal-preview';
import {ROUTER_PROVIDERS} from 'angular2/router';
import {App} from './app/app';
bootstrap(App, [
...ROUTER_PROVIDERS
]);
开发者ID:Shkryob,项目名称:universal-starter,代码行数:9,代码来源:client.ts
示例3: bootstrap
import {Component} from 'angular2/core';
import {bootstrap} from 'angular2-universal-preview';
import {App} from './app';
bootstrap(App);
开发者ID:bigbassroller,项目名称:ng2-play-universal,代码行数:7,代码来源:bootstrap.ts
示例4: bootstrap
import 'reflect-metadata';
import 'zone.js/dist/zone-microtask';
import 'zone.js/dist/long-stack-trace-zone';
import {bootstrap} from 'angular2-universal-preview';
import {ComponentRef} from 'angular2/core';
import {HTTP_PROVIDERS} from 'angular2/http';
import {FORM_PROVIDERS} from 'angular2/common';
import {ROUTER_PROVIDERS} from 'angular2/router';
import {APP_SERVICES_PROVIDERS, IdentityService, Storage} from "./app/common/services/services";
import {App} from './app/app';
const PROVIDERS = [
...HTTP_PROVIDERS,
...FORM_PROVIDERS,
...ROUTER_PROVIDERS,
...APP_SERVICES_PROVIDERS
];
bootstrap(App, PROVIDERS)
.then((appRef: ComponentRef) => {
let storage: Storage = appRef.injector.get(Storage);
let identity: IdentityService = appRef.injector.get(IdentityService);
storage.initStorage(window.localStorage);
storage.getItem("authorizationData").then((value) => {
identity.update(JSON.parse(value));
})
}, error => console.log(error))
开发者ID:cm0s,项目名称:mea2n,代码行数:30,代码来源:client_browser.ts
示例5: bootstrap
import {bootstrap} from "angular2-universal-preview";
import {ROUTER_PROVIDERS} from "angular2/router";
import {MATERIAL_NODE_PROVIDERS} from "ng2-material/all";
import {HTTP_PROVIDERS} from "angular2/http";
import {ComponentsService} from "../../services/components";
import {NavigationService} from "../../services/navigation";
import {VersionService} from "../../services/version";
import {DemosApp} from "../../app";
bootstrap(DemosApp, [
HTTP_PROVIDERS, ROUTER_PROVIDERS, MATERIAL_NODE_PROVIDERS,
ComponentsService, NavigationService, VersionService
]);
开发者ID:dmacfarlane,项目名称:ng2-material,代码行数:13,代码来源:bootstrap.ts
注:本文中的angular2-universal-preview.bootstrap函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论