这是一个ts文件中的一个函数,我传递的是经度和纬度。现在我必须在其他组件中获取这些经纬度,以便如何在其他组件中获取这些参数。如何获取角度2中的其他组件中的多个参数
routeWithData(id, latitude, longitude)
{
//console.log(latitude, longitude);
this.router.navigate(['/provider/bookings/'+id+'/details/map-location/'+latitude+'/'+longitude]);
}
你只需要连接经纬度与任何分隔符(当然不包括/和)。例如谷歌地图在URL中传递坐标为'@ 45.4572583,4.4090734' – StephaneM
我应该怎么做。 –