source: Farmatiko/ClientApp/src/main.ts@ 42e2397

Last change on this file since 42e2397 was 822c59d, 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.