Sharing Top Content from the Angular-sphere.

AngularJS router to use different template for Mobile and Desktop

  • You are : Home / Programming / AngularJS router to use different template for Mobile and Desktop
  • What we have done is just wrote a function named as “_isNotMobile” which will return true/false by checking user agent of device and we have used that function inside AngularJs app’s router, before actually specifying template/view paths and that’s it!
  • In your AngularJS application if you want to use different templates/views for mobile and desktop users then following script may be useful for you.
  • ( browser | link ) | vodafone | wap | windows ( ce | phone ) | xda | xiino / i .
  • Shubham Takode is blogger and founder of shubhsblog.com .

Read the full article, click here.


@shubhsblog: “Modify AngularJS router to use different template for Mobile and Desktop – Shubhs Blog”


In your AngularJS application if you want to use different templates/views for mobile and desktop users then following script may be useful for you. What we have done here is just wrote a function named as “_isNotMobile”  which will return true/false by checking user agent of device and we have used that function inside AngularJs app’s router, before actually specifying template/view paths and that’s it! Simple!


AngularJS router to use different template for Mobile and Desktop

Comments are closed, but trackbacks and pingbacks are open.