How can I make a dropdown button label change to the selected item name?

I am trying to create a dropdown button whose label will change to the name of whichever item is selected. It seemed to be working but when restarted the server I got duplicate identifier errors. I’m not sure how to reformat the code to get rid of the errors while keeping the initial placeholder text "Filter Search". I’m still a beginner so any help would be appreciated.
Thank you!

HTML:

<div ngbDropdown>
<button class="btn btn-lg" ngbDropdownToggle>{{currentSelection?.name}}</button>
<div ngbDropdownMenu>
    <div>
        <h3 *ngFor="let option of options" (click)="setCurrentSelection(option)">{{option?.name}}</h3>
    </div>
</div>

TS:

import {Component,EventEmitter,} from "@angular/core";
@Component({
  selector: "my-app",
  styleUrls: ["app.component.scss"],
  templateUrl: "./app.component.html"
})
export class AppComponent {

  emptyDataSelection = {
    name: 'Select'
  };
  
  options = [
    { name: "Any", id: 1 },
    { name: "AII", id: 2 },
    { name: "AHJ", id: 3 },
    { name: "SP", id: 4 },
    { name: "PO", id: 5 },
    { name: "Address", id: 6 },
    { name: "Contact", id: 7 },
    { name: "Report", id: 8 }
  ];

  currentSelection = {
    name: "Filter Search"
  };

  currentSelectionChange = new EventEmitter<object>();
  _currentSelection: any;
  get currentSelection() {
    return this._currentSelection;
  }
  
  set currentSelection(value) {
    this._currentSelection =
      value === '' || value === null || value === undefined
        ? this.emptyDataSelection
        : value;
  }

  setCurrentSelection(option) {
    this.currentSelection = option;
    this.currentSelectionChange.emit(option);
  }
}

Source: Angular Questions