Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// The AppModule serves to combine our various comsponents, services and models into a discreet module.
// All required references are imported above, and then referenced as follows:
// imports: External modules that will be consumed by AppModule.
// declarations: Internal Components and Directives that will be consumed by the rendering engine.
// providers: Internal Services and Resolvers that will be consumed the the Dependency Injection engine.
// bootstrap: The Component to display first.
@NgModule({
imports: [
BrowserModule,
FormsModule,
NgbModule.forRoot(),
HttpModule,
// Note that we are using an In Memory Database Service to serve our data to our service.
// We configure the starting point for the service here.
// Note that this service must be imported *after* the HttpModule to allow it to attach it's interceptors to the Http service.
InMemoryWebApiModule.forRoot(InMemoryDataService, {passThruUnknownUrl: true}),
appRouting
],
declarations: [
AppComponent,
HomeComponent,
FruitListComponent,
FruitDetailComponent,
FruitItemImageComponent,
FruitImageCellComponent
],
providers: [
FruitService,
FruitDetailResolver
],
bootstrap: [ AppComponent ]
})