how to jump to different links through the mobile phone system
how to jump to different links through the mobile phone system
it is not recommended to put such complex logic in the template, generally complex logic is placed in the method, and then the method is called with events.
//
<span (click)="openlink"></span>
//ts
//
openlink(): void {
const os = 'android/ios';
if (os === 'android'){
//
location.href = 'andriod ';
}else if (os === 'ios')(
location.href = 'ios ';
)else{
location.href = ' ';
}
}
if event listeners are placed on the a tag, block the default behavior.
if the answer is helpful to you, I hope to adopt
Previous: Wechat generates a QR code with parameters.
Next: Excuse me, how to configure the double bar chart of echarts?