本文整理汇总了TypeScript中angular2-universal.bootstrap函数的典型用法代码示例。如果您正苦于以下问题:TypeScript bootstrap函数的具体用法?TypeScript bootstrap怎么用?TypeScript bootstrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bootstrap函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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:pjcdarker,项目名称:angular2-iot,代码行数:7,代码来源:index.ts
示例2: setTimeout
setTimeout(function () {
bootstrap(AppComponent, [HTTP_PROVIDERS]).then(function () {
let environment = document.getElementById('environment');
environment.innerText = 'Client';
environment.setAttribute('class', 'environment environment-client');
});
}, 5000);
开发者ID:fydoh,项目名称:phoenix-js-meetup,代码行数:7,代码来源:client.ts
示例3: main
function main() {
return bootstrap(App, [
...BROWSER_ROUTER_PROVIDERS,
...BROWSER_HTTP_PROVIDERS
])
.then(setClientRenderedEl);
}
开发者ID:Erbolking,项目名称:ng-conf-2016-universal-patterns,代码行数:7,代码来源:client.ts
示例4: ngApp
export function ngApp() {
return bootstrap(App, [
...BROWSER_ROUTER_PROVIDERS,
...BROWSER_HTTP_PROVIDERS,
...BROWSER_STORE_PROVIDERS
]);
}
开发者ID:gdi2290,项目名称:angular-sf-2016-5-13-universal-dependencies,代码行数:9,代码来源:main.browser.ts
示例5: main
export function main(): Promise<any> {
return bootstrap(App, [
...PROVIDERS,
...ENV_PROVIDERS,
...DIRECTIVES,
...PIPES,
...APP_PROVIDERS
])
.catch(err => console.error(err));
}
开发者ID:gdi2290,项目名称:universal-angular2-starter,代码行数:10,代码来源:main.browser.ts
示例6: setTimeout
setTimeout(function () {
bootstrap(AppComponent, [...HTTP_PROVIDERS, provideRouter(routes)]).then(function () {
let environment = document.getElementById('environment');
environment.innerText = 'Client';
environment.setAttribute('class', 'environment environment-client');
})
// .then(() => {
// setTimeout(function() {
// prebootComplete
// }, 400);
// })
;
}, 5000);
开发者ID:fydoh,项目名称:phoenix-js-meetup,代码行数:13,代码来源:client.ts
示例7: bootstrap
* See: https://angular.io/docs/ts/latest/api/platform/browser/bootstrap-function.html
*
* This also initializes all our application's data providers (e.g. services, etc)
* by passing them to the main component. For more on providers/injection, see this blog post:
* http://blog.thoughtram.io/angular/2015/05/18/dependency-injection-in-angular-2.html
**/
bootstrap(AppComponent, [
...BROWSER_ROUTER_PROVIDERS,
...BROWSER_HTTP_PROVIDERS,
provide(TranslateLoader, {
useFactory: (http: Http) => new TranslateStaticLoader(http, 'i18n', '.json'),
deps: [ Http ]
}),
AuthorizationService,
BreadcrumbService,
ContextProviderService,
DSpaceConstants,
DSpaceDirectory,
DSpaceService,
FormService,
GoogleScholarMetadataService,
HttpService,
MetadataHelper,
MetaTagService,
NotificationService,
PaginationService,
PagingStoreService,
StorageService,
TranslateService
]).then(prebootComplete);
开发者ID:hardyoyo,项目名称:angular2-ui-prototype,代码行数:30,代码来源:main.ts
示例8: bootstrap
import {bootstrap} from "angular2-universal";
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:ferdinandtorggler,项目名称:ng2-material,代码行数:13,代码来源:bootstrap.ts
示例9: enableProdMode
import 'angular2-universal/polyfills';
import {bootstrap, enableProdMode, BROWSER_ROUTER_PROVIDERS, BROWSER_HTTP_PROVIDERS} from 'angular2-universal';
import {App} from './app/app.component';
import {BROWSER_FALCOR_PROVIDERS} from './app/angular2-falcor/browser';
enableProdMode();
bootstrap(App, [
...BROWSER_ROUTER_PROVIDERS,
...BROWSER_HTTP_PROVIDERS,
...BROWSER_FALCOR_PROVIDERS
]);
开发者ID:gdi2290,项目名称:angular2-falcor-starter,代码行数:17,代码来源:client.ts
示例10: bootstrap
import 'angular2-universal/polyfills';
import {bootstrap, BROWSER_ROUTER_PROVIDERS, BROWSER_HTTP_PROVIDERS} from 'angular2-universal';
import {AppComponent} from './appcomponent'
bootstrap(AppComponent, [
...BROWSER_ROUTER_PROVIDERS,
...BROWSER_HTTP_PROVIDERS
]);
开发者ID:MarkPieszak,项目名称:server-side-rendering,代码行数:9,代码来源:main.ts
注:本文中的angular2-universal.bootstrap函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论