Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div foo ng-repeat="item in [{url:'var',text:'one'},{url:'char',text:'two'}]">
- <img src="{{item.url}}" />
- <p>{{item.text}}</p>
- </div>
- app.directive('foo',function(){
- return{
- restrict : 'A',
- transclude:'element',
- scope:{},
- link:function(scope,element,attrs,ctrl,transclude){
- transclude(function(clone,transScope){
- console.log(clone.html());
- });
- }
- }
- });
- <img src="{{img.image}}">
- <p class="ng-binding">{{img.text}}</p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement