I am trying to remove the selected element from the ng-select using the program. As we can delete it using click cross button but we want to delete programmatic way in Angular 6. Please help me to find a perfect solution.
You want only this line :
this.selectedCityIds = this.selectedCityIds.filter(s => s != id);
Which is you can use it in your function in this way;
deleteSingle (id: string) {
this.selectedCityIds = this.selectedCityIds.filter(s => s != id);
}