import { Component } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { EventManager } from 'app/core/util/event-manager.service'; import { IUserWatchList } from 'app/shared/model/user-watch-list.model'; import { UserWatchListService } from 'app/entities/user-watch-list/user-watch-list.service'; @Component({ templateUrl: './bookmarks-delete-dialog.component.html', }) export class BookmarksDeleteDialogComponent { userWatchList?: IUserWatchList; constructor( protected userWatchListService: UserWatchListService, public activeModal: NgbActiveModal, protected eventManager: EventManager ) {} cancel(): void { this.activeModal.dismiss(); } confirmDelete(id: number): void { this.userWatchListService.delete(id).subscribe(() => { this.eventManager.broadcast('userWatchListListModification'); this.activeModal.close(); }); } }