angularjs - how to pass directive attribute to directive template? -


i'm have code:

<div ng-repeat="param in item.parameters">     <rating param_item="{{param}}"></rating> </div> 

how can pass given attribute directive template?

personally, creating child scope element directives: http://plnkr.co/edit/dz7fczat4kdrda869rwm?p=preview

app.directive('rating', function() {   return {     restrict: 'e',     scope: {       paramitem: '@'     },     link: function(scope, element, attr){       console.log(scope.paramitem);     }   } }); 

there couple other ways too, depending on how expect directive work.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -