api-client-generator icon indicating copy to clipboard operation
api-client-generator copied to clipboard

Throw custom error message for missing http client module

Open vmasek opened this issue 4 years ago • 0 comments

Something like this could do

export class ApiClientModule {
    constructor(@Optional() http: HttpClient) {
        if (!http) {
            throw new Error('You need to import the HttpClientModule in your main module (usually AppModule).');
        }
    }
}

vmasek avatar Nov 23 '20 19:11 vmasek