How to make the templateURL that will load the HTML template at runtime based on the data passed?

前端 未结 1 667
长发绾君心
长发绾君心 2020-12-22 13:09

I am following the example of Template-expanding directive

\"enter

It is worki

相关标签:
1条回答
  • 2020-12-22 13:38

    You've got few mistakes please see here for working demo

    http://plnkr.co/edit/RQ1xWaLUAsBpNgyMWujI?p=preview

    my-customer should be inside tr tag not before table
    

    you need to pass your customer to directive scope so in you can do that by crating isolate scope

     scope: {
    
          customer: '=myCustomer'
        },
    

    and in your view

    my-customer="x"
    

    as x is your customer

    0 讨论(0)
提交回复
热议问题