So recently I had to update to the latest version of Angular2, RC.6. The biggest breaking change seems to be the whole bootstrapping (by "introducing" ngModule).
@NgModule({
imports: [HttpModule, BrowserModule, FormsModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [AppComponent, ...],
providers: [FrameService, Http, { provide: $WINDOW, useValue: window }],
bootstrap: [AppComponent]
})
class AppModule {
}
platformBrowserDynamic().bootstrapModule(AppModule);
However after a lot of tears, sweat and pleading to all the deities I could come up with... I still remain with what is hopefully the last error in a series of many:
No provider for ConnectionBackend!
At this point I am tearing out the last strains of hair I have left as I am clueless at this point regarding the "what I am missing".
Kind regards!
Http
is redundant in
providers: [FrameService, Http, { provide: $WINDOW, useValue: window }],
because HttpModule
in
imports: [HttpModule, BrowserModule, FormsModule],
provides it already.
In app.module.ts add:
import { HttpModule } from '@angular/http';
And import module:
imports: [
...
HttpModule
...
],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With