I have these scope elements (in a directive)

scope.itemId = 5;
scope.iconList = [
  {"type":"radio-state-icon","name":"lock:unlock"},
  {"type":"single-state-icon","name":"bin"},
  {"type":"single-state-icon","name":"picture"}
]; 

And this template

   var tmpl='<span ng-repeat="icon in iconList" {{icon.type}} 
data-item-id="{{itemId}}" data-icon="{{icon.name}}"></span>';

And this code

   var el = angular.element(tmpl);
   var compiled = $compile(el);
   element.append(el);
   compiled(scope);

And the resulting html 

  <span ng-repeat="icon in iconList" {{icon.type}} data-item-id="5" 
data-icon="lock:unlock" class="ng-scope"></span>
  <span ng-repeat="icon in iconList" {{icon.type}} data-item-id="5" 
data-icon="bin" class="ng-scope"></span>
  <span ng-repeat="icon in iconList" {{icon.type}} data-item-id="5" 
data-icon="picture" class="ng-scope"></span>

How can it be doing one part of my template and not another ?


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to