Why does the order of NgModule imports matter? : <p>I have been going through the Angular tutorial and when going through the HTTP section <a href="https://angular.io/docs/ts/latest/tutorial/toh-pt6.html" rel="noreferrer">https://angular.io/docs/ts/latest/tutorial/toh-pt6.html</a> and have noticed that the order in which imports are declared in the NgModule makes a difference in terms of whether or not the application works.  I would like to know why that is.</p>

<p>In particular this works:</p>

<pre>

    @NgModule({
      imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        InMemoryWebApiModule.forRoot(InMemoryDataService),
        AppRoutingModule
      ],
    ... 
    }) 

</pre>

<p>but the following does not.  The list of heroes does not get loaded.  Note that the HttpModule is declared AFTER the InMemoryWebApiModule:</p>

<pre>

    @NgModule({
      imports: [
        BrowserModule,
        FormsModule,
        InMemoryWebApiModule.forRoot(InMemoryDataService),
        HttpModule,
        AppRoutingModule
      ],
     ...
    })

</pre>

<p>The tutorial is using Angular 2.4.4.  I have noticed the problem in both Firefox and IE.  I have not found anything in my google searches that would indicate the source of the problem.</p>
