Skip to content

Commit 1ca1dc1

Browse files
committed
fix: restore dashboard configuration for standalone bootstrap
1 parent 5bf228a commit 1ca1dc1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/app/app.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CommonModule } from '@angular/common';
22
import { Component } from '@angular/core';
33
import { FormsModule } from '@angular/forms';
4-
import { DashboardCoreModule, DashboardEditorModule } from '@hypertrace/hyperdash-angular';
4+
import { DashboardCoreModule, DashboardEditorModule, DefaultConfigurationService } from '@hypertrace/hyperdash-angular';
55
import { ExampleDashModule } from '../example-dash/example-dash.module';
66
import { GraphQlDataSourceModule } from '../example-dash/graphql-data-source.module';
77

@@ -20,4 +20,8 @@ import { GraphQlDataSourceModule } from '../example-dash/graphql-data-source.mod
2020
})
2121
export class AppComponent {
2222
public readonly title: string = 'hyperdash-angular';
23+
24+
public constructor(defaultConfigurationService: DefaultConfigurationService) {
25+
defaultConfigurationService.configure();
26+
}
2327
}

src/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
import { enableProdMode, provideZonelessChangeDetection } from '@angular/core';
1+
import { enableProdMode, importProvidersFrom, provideZonelessChangeDetection } from '@angular/core';
2+
import { provideHttpClient } from '@angular/common/http';
23

34
import { environment } from './environments/environment';
45
import { bootstrapApplication } from '@angular/platform-browser';
56
import { AppComponent } from './app/app.component';
7+
import { DashboardCoreModule } from '@hypertrace/hyperdash-angular';
68

79
if (environment.production) {
810
enableProdMode();
911
}
1012

1113
bootstrapApplication(AppComponent, {
12-
providers: [provideZonelessChangeDetection()]
14+
providers: [provideZonelessChangeDetection(), provideHttpClient(), importProvidersFrom(DashboardCoreModule)]
1315
}).catch(err => {
1416
console.error(err);
1517
});

0 commit comments

Comments
 (0)