File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ Working demo https://plnkr.co/edit/OgvZ09iYO64VoXHLRGQa?p=preview
1515 - [ Installation] ( #installation )
1616 - [ Examples] ( #examples )
1717 - [ Usage] ( #usage )
18- - [ angular-quickstart] ( #quickstart )
19- - [ angular-seed] ( #seed )
2018
2119## <a name =" get-started " ></a > Get Started
2220
@@ -47,6 +45,8 @@ import { NgxHttpBatcherModule,
4745
4846import { AppComponent } from " ./app.component" ;
4947
48+ // Exported function so that HttpBatchConfigurationCollection can be used as in DI.
49+ // Having this as an exported function enabled AOT complication as well :-)
5050export function httpBatchConfigurationFactory () {
5151 return new HttpBatchConfigurationCollection ([
5252 new HttpBatchConfiguration ({
@@ -55,6 +55,9 @@ export function httpBatchConfigurationFactory() {
5555 })]);
5656};
5757
58+ // Note the providers block where the Http class is being replaced by the HttpBatcher class.
59+ // This ensures that if you inject the Http service into something you actually get the
60+ // HttpBatcher class.
5861@NgModule ({
5962 declarations: [
6063 AppComponent
You can’t perform that action at this time.
0 commit comments