forked from barbatus/angular2-meteor-universal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap_client.ts
More file actions
27 lines (20 loc) · 775 Bytes
/
bootstrap_client.ts
File metadata and controls
27 lines (20 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'use strict';
import {Type, ComponentRef} from '@angular/core';
import {assertionsEnabled} from '@angular/core/src/facade/lang';
import {Providers} from 'angular2-meteor';
import {ClientOptions, UniOptions} from './bootstrap';
import ClientRenderer from './client_renderer';
export const clientDefault: ClientOptions = {
debug: false
};
export function bootstrap(component: Type,
providers?: Providers,
options: UniOptions = {
client: clientDefault
}): Promise<ComponentRef<any>> {
return new Promise((resolve, reject) => {
const renderer = new ClientRenderer(options.client);
renderer.render(component, providers);
});
}
export * from './router';