(function(){

  angular
    .module('izApp')
    .directive('freeStyleKontakte', freeStyleKontakte);

  
freeStyleKontakte.$inject=["ContactsService"];  
function freeStyleKontakte(ContactsService){
	return {
	    restrict: 'E',
	    transclude: true,
	  	template: '<div class="free-style-kontakte" ng-transclude=""></div>',
	  	link: function(scope,element,attr){
		  if(attr.eventId){
			ContactsService.getContacts(attr.eventId).then( function(data){
			  scope.kontakte = data;
			});
		  }		  
		}
	}
}
  

}());
