How to use the angular2-universal.BASE_URL function in angular2-universal

To help you get started, we’ve selected a few angular2-universal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github barbatus / angular2-meteor-universal / build / client_renderer.js View on Github external
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;
github barbatus / angular2-meteor-universal / build / bootloader.js View on Github external
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) {