Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -18,7 +18,7 @@ const serviceName = 'TaxService';
|
||||
export class TaxService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
|
||||
get(id: string): Observable<Tax> {
|
||||
get(id: string | null): Observable<Tax> {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
return <Observable<Tax>>(
|
||||
this.http.get<Tax>(getUrl).pipe(catchError(this.log.handleError(serviceName, `get id=${id}`)))
|
||||
|
||||
Reference in New Issue
Block a user