Last active
June 29, 2019 12:13
-
-
Save Gbuomprisco/ced83d458164131dd200cafef2ec098e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in a real app could be environment.useMocks ? | |
const useMocks = true; | |
@NgModule({ | |
imports: [BrowserModule, CommonModule], | |
declarations: [AppComponent, CryptoSelectorComponent], | |
bootstrap: [AppComponent], | |
providers: [ | |
{ | |
provide: PriceApiService, | |
useClass: useMocks ? MockPriceApiService : PriceApiService | |
} | |
] | |
}) | |
export class AppModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment