Service Providers
Understand the changes to defining service providers
Mapping Model to Service
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgrxAutoEntityModule } from '@briebug/ngrx-auto-entity';
import { AppComponent } from './app.component';
import { Customer } from 'models';
import { CustomerService } from 'services/customer.service';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, NgrxAutoEntityModule],
providers: [
{ provide: Customer, useClass: CustomerService }
],
bootstrap: [AppComponent]
})
export class AppModule {}Last updated