source: Farmatiko/ClientApp/src/main.ts@ d2e69be

Last change on this file since d2e69be was 30a465f, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago

Initial commit

  • Property mode set to 100644
File size: 553 bytes
Line 
1import { enableProdMode } from '@angular/core';
2import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3
4import { AppModule } from './app/app.module';
5import { environment } from './environments/environment';
6
7export function getBaseUrl() {
8 return document.getElementsByTagName('base')[0].href;
9}
10
11const providers = [
12 { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
13];
14
15if (environment.production) {
16 enableProdMode();
17}
18
19platformBrowserDynamic(providers).bootstrapModule(AppModule)
20 .catch(err => console.log(err));
Note: See TracBrowser for help on using the repository browser.