[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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e47bcc-44c70.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e47bcc-44c70.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?