color="{{ball.color}}" ng-repeat="ball in balls" ></ball> <ball color="purple"></ball> </div> Demo - http://jsfiddle.net/royuen/Bckpx/ function ballCtrl($scope) { $scope.balls = [{color: 'blue'}, {color: 'yellow'}, {color: 'brown'}]; } angular.module('ballApp', []). directive('ball', function() { return { restrict: 'E', scope: true, link: function(scope, element, attrs) { scope.$watch(attrs.color, function(color) { element.css('background', attrs.color); }); scope.hide = function() { element.fadeOut(); } }, template: '<div class="ball" ng-click="hide()" ></div>', replace: true }; }) Demo - http://jsfiddle.net/simpulton/EMA5X/