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