Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

When i delete the object it will delete the content but not delete the object. #249

Open
@rksingh1999

Description

@rksingh1999

clickToDelete() method
clickToDelete(activityId: string){
this.activityService.deleteActivity(activityId).subscribe(act=>{
this.getActivities();
this.deleteInfo= true;
this.dataSaved= false;
});
}

getAllActivities() method
getActivities(){
this.activityService.getAllActivity().subscribe((data: Activity[] )=>{
this.activities = data;
console.log(this.activities);
});
}
CMS cervice class /getAllactivity method
getAllActivity():Observable<Activity[]>{
return this.http.get<Activity[]>(this.activityUrl);
}
this is delete method which is in CMS service
deleteActivity(activityId: string):Observable{
let httpHeaders = new HttpHeaders().set('Content-type','application/json');
let options={
headers:httpHeaders
};
return this.http.delete(this.activityUrl+"/"+activityId);
}
Service Class
Screenshot (443)
Activity.ts
Screenshot (444)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions