Currently, I am facing an issue with the progress bar functionality while utilizing the ng-bootstrap module. The scenario involves a dropdown menu with multiple options, and my desired behavior includes:
- The ability to start/stop the progress bar independently for each option selected from the dropdown.
- When switching between different options and returning to a previous selection, the counting should continue seamlessly in the background.
In the past, a solution was implemented that worked flawlessly. However, as often happens in the realm of IT, a bug surfaced unexpectedly.
Below is a snippet from the service file:
@Injectable()
export class TimerService {
constructor(private httpClient: HttpClient) {
}
// Code snippet continues...
And now, moving on to the component file:
export class TimerComponent implements OnInit, OnDestroy, OnChanges {
@Input() optionDropdownArray: string[];
isLoading: boolean;
progress: number [] = [0];
// Code snippet continues...