我像这样在 app.module.ts 中定义路由
{ path: 'property-detail/:Id', component: PropertyDetailComponent },
然后我给 routeLink 如下
<li class="list-inline-item">
<button class="btn btn-primary" [routerLink]="['/property-detail',property.Id]">
<i class="fas fa-edit"></i>
</button>
</li>
但是当我单击按钮时,它显示的 urlhttp://localhost:4200/property-detail/undefined
没有显示id
如何解决这个问题的值。