I have an API url like this : localhost:3000/api/categories?id=1. How can i get id in value by query params and delete this Object in Angular 5. My code in angular like this :
private url = 'http://localhost:3000/api/categories';
deleteMovie(categoryId: number): Observable<CategoriesModel> {
const url = url to get value
return this.http.delete<CategoriesModel>(url, httpOptions).pipe(
tap(_ => console.log(`Deleted category with id = ${categoryId}`)),
catchError(error => of(null))
);
}