[angularjs] the ng-if ternary operator jumps to different chains, and all kinds of heroes help.

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

Menu