Skip to content

Commit ae9849b

Browse files
committed
Document splitted modules
1 parent 88fcf42 commit ae9849b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.MD

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,33 @@ import { NgHttpLoaderModule } from 'ng-http-loader/ng-http-loader.module'; <====
6262
export class AppModule { }
6363
```
6464

65+
or (splitted modules mode for more convenience)
66+
67+
```typescript
68+
import { BrowserModule } from '@angular/platform-browser';
69+
import { NgModule } from '@angular/core';
70+
[...]
71+
import { AppComponent } from './app.component';
72+
import { HttpClientModule } from '@angular/common/http'; <============
73+
import { NgHttpLoaderComponentsModule } from 'ng-http-loader/components/ng-http-loader-components.module'; <============
74+
import { NgHttpLoaderServicesModule } from 'ng-http-loader/services/ng-http-loader-services.module'; <============
75+
76+
@NgModule({
77+
declarations: [
78+
AppComponent
79+
],
80+
imports: [
81+
BrowserModule,
82+
HttpClientModule, <============ (Perform http requests with this module)
83+
NgHttpLoaderServicesModule, <============
84+
NgHttpLoaderComponentsModule, <============
85+
],
86+
providers: [],
87+
bootstrap: [AppComponent]
88+
})
89+
export class AppModule { }
90+
```
91+
6592
In your app.component.html, add :
6693
```xml
6794
<spinner></spinner>

0 commit comments

Comments
 (0)