AngularJS different views based on Desktop or Mobile

后端 未结 6 1976
梦毁少年i
梦毁少年i 2020-12-07 09:09

I would like to use AngularJS for a single page webapp. I am concerned if there is an elegant way to \"send\" different templates based on whether the client is

6条回答
  •  眼角桃花
    2020-12-07 09:45

    use boostrap. and it could be easily done.

     
     
      
      

    and in landing.html

      

    ANd in config

     $routeProvider
        .when(/,{
         templateUrl : "landing.html"
         controller : "landingCtrl"
        });
    

    it works floawlessley for me. Its not of the way. maybe there could be another using pure JS. This just happened pout of the box since i am using boostrap and leverage it to my advantage.

提交回复
热议问题