|
@ -9,7 +9,10 @@ import { OrderDiscountService } from './order-discount.service'; |
|
|
@NgModule({ |
|
|
@NgModule({ |
|
|
imports: [BrowserModule, FormsModule], |
|
|
imports: [BrowserModule, FormsModule], |
|
|
declarations: [AppComponent], |
|
|
declarations: [AppComponent], |
|
|
providers: [{ provide: OrderService, useExisting: OrderDiscountService },OrderDiscountService], |
|
|
|
|
|
|
|
|
providers: [{ |
|
|
|
|
|
provide: OrderService, |
|
|
|
|
|
useValue:{computeTotal:()=>100}, |
|
|
|
|
|
},], |
|
|
|
|
|
|
|
|
bootstrap: [AppComponent], |
|
|
bootstrap: [AppComponent], |
|
|
}) |
|
|
}) |
|
|