我想发送一些带有实时网址的参数,例如Link。我该如何使用网址发送这些参数。
buyPolicy() {
let obj = {
Id: this.idNumber,
Dob: this.dob,
SerialNo: this.vehicleSeqNo,
MobileNo: this.mobile,
EmailId: this.email,
RefID: this.vehicleId
};
let navigationExtras: NavigationExtras = {
queryParams: { ...obj }
};
this.router.navigate(['https://google.co.in'], navigationExtras);
}
Angular路由器用于在您的应用程序内进行路由。要导航到外部URL,必须使用window.open。
const url = 'https://google.co.in?Id:1234&carId:127';
window.open(url);