title: Redirect According To Device - Angular
body: <p>In Angular I am trying to redirect the page according to device. If it is <strong>Web</strong> I am redirecting <code>www.web.com</code> ,If it is <strong>Andriod</strong> I am redirecting to <code>www.andriod.com</code> and If it is <strong>iOS</strong>, I am redirecting to <code>www.iOS.com</code> But I don't know how to find the device and implement this condition.</p>
  
  <p><strong>TS</strong></p>
  
  <pre><code>if(mobile.andriod){                                    //How to check whether it is Andriod
  window.location.href='www.andriod.com'
  }
  else if(mobile.ios){                                  //How to check whether it is iOS
    window.location.href='www.ios.com'
  }
  else if(web){
     window.location.href='www.web.com'
  }
  </code></pre>