Skip to content

Commit

Permalink
docs: update readme with standalone example for http (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitale232 authored Apr 4, 2024
1 parent 0fb81e0 commit 1859d4e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ import { AppComponent } from './app';
export class AppModule {}
```

**Note:** If using `LoadingBarHttpClientModule` with Angular Standalone APIs, ensure you import the providers from the module in the `ApplicationConfig` `providers` array:

```ts
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client';

export const appConfig: ApplicationConfig = {
providers: [
...
importProvidersFrom(LoadingBarHttpClientModule),
],
};
```

#### 3. Include `ngx-loading-bar` in your app component:

```ts
Expand Down

0 comments on commit 1859d4e

Please sign in to comment.