我传递数据这样角通数据
console.log(this.regForm.value); //there is data
this._router.navigate(["/tsafety/checklist-checks"], this.regForm.value);
在组件与路由checklist-checks
我想只要我试图访问this.truckdetails
它使用
constructor(private route:ActivatedRoute)
{
this.route
.params
.subscribe(params => {
this.truckdetails = params; //this is never set
console.log(params);// this is empty
});
}
检索数据总是空的。
我还需要添加什么来获取传递的数据?