我想将projectId
与url
一起传递。我该如何实现?
var projectId = e.data.id;
var url = `/pages/project_details/,`projectId`,/Ongoing`;
this.router.navigateByUrl(url).then(e =>{
if(e){
console.log('routed');
}else{
console.log('not routed');
}
});
您可以这样使用。
var projectId = e.data.id;
var url = `/pages/project_details/${projectId}/Ongoing`;
console.log(url);