AngularJS : Pass $scope variable as directive attribute

后端 未结 4 1912
失恋的感觉
失恋的感觉 2021-02-13 14:27

I\'m trying to pass the $scope variable values to a custom directive as attribute, but it\'s not working.

Here is the HTML code:

4条回答
  •  耶瑟儿~
    2021-02-13 15:19

    I think you need to pass "q.id" instead of name={{q.id}} provided $scope.q.id is defined in your corresponding controller.

     
    

提交回复
热议问题