Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function bootstrap(component, providers, options) {
providers = (providers || []).concat(core_1.provide(common_1.APP_BASE_HREF, { useValue: router_1.Router.baseUrl }), core_1.provide(angular2_universal_1.BASE_URL, { useValue: router_1.Router.baseUrl }));
var selector = utils_1.resolve(component);
if (!DOM.querySelector(document, selector)) {
return bootstrapClient(component, providers, options);
}
return bootstrapPreboot(component, providers, options);
}
exports.bootstrap = bootstrap;
Bootloader.prototype.getAppProviders = function (options) {
return angular2_universal_1.NODE_PLATFORM_PIPES.concat(angular2_universal_1.NODE_HTTP_PROVIDERS, angular2_meteor_1.METEOR_PROVIDERS, angular2_universal_1.NODE_ROUTER_PROVIDERS, angular2_universal_1.NODE_LOCATION_PROVIDERS, [
core_1.provide(angular2_universal_1.ORIGIN_URL, { useValue: global.process.env.ROOT_URL }),
core_1.provide(angular2_universal_1.BASE_URL, { useValue: router_1.Router.baseUrl }),
core_1.provide(compiler_1.XHR, {
useFactory: function (ngZone) {
return new meteor_xhr_impl_1.MeteorXHRImpl(ngZone);
},
deps: [core_1.NgZone]
}),
core_1.provide(logger_1.Logger, { useValue: new logger_1.Logger(router_1.Router.pathDef, options.debug) }),
core_1.provide(angular2_universal_1.REQUEST_URL, { useValue: router_1.Router.reqUrl })
]);
};
Bootloader.prototype.bootstrap = function (component, providers, options) {