Advertisement
Guest User

Untitled

a guest
May 1st, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <div foo ng-repeat="item in [{url:'var',text:'one'},{url:'char',text:'two'}]">
  2. <img src="{{item.url}}" />
  3. <p>{{item.text}}</p>
  4. </div>
  5.  
  6. app.directive('foo',function(){
  7. return{
  8. restrict : 'A',
  9. transclude:'element',
  10. scope:{},
  11. link:function(scope,element,attrs,ctrl,transclude){
  12. transclude(function(clone,transScope){
  13. console.log(clone.html());
  14. });
  15. }
  16. }
  17. });
  18.  
  19. <img src="{{img.image}}">
  20. <p class="ng-binding">{{img.text}}</p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement