search

Home  >  Q&A  >  body text

angular.js - Can angular pass parameters to templates?

Can Angular pass parameters to templates?

黄舟黄舟2840 days ago615

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-15 17:11:47

    Just implement the function on template

     templateUrl: function($routeParams) {
               return 'tpl/home/' + $routeParams.id ;
    }

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-15 17:11:47

    Isn’t the value of the template bound to the scope? I don’t know what kind of parameters you are talking about. It’s best to give the code

    reply
    0
  • Cancelreply