Angular route param is empty
See if you can get the desired id with this:
...
import { ActivatedRoute } from '@angular/router';
...
constructor(
...
private activatedRoute: ActivatedRoute
...
) {}
ngOnInit(): void {
const id = Number(this.activatedRoute.snapshot.paramMap.get('id'));
console.log(id);
}