javascript - AngularJS directive - accessing parent attribute from templateUrl method -
I have no control as items list with nested items.
templateUrl: (tElement, tAttrs) -> TAttrs.template or '/item-template.html'
This works fine, but as a parent attribute to avoid setting a template for each item I want to store template url. Obviously, the template is the same for every item.
This stage has not been set yet. So I think the easiest way to implement it:
templateUrl: (TELEMENT, TATRS) - & gt; Atter ('Template') or '/item-template.html'
But I'm not sure this is the best way ...
So my question What is the best way to achieve this?
Thank you!
I want to deal with this
// index.jade Doctype html html included / head body h1 my site p Welcome to my super lame site. This includes / foot
I have to keep markup stuff out of the code and believe the markup that you are doing
Comments
Post a Comment