app.directive('entityList', function($compile) {
  return {
    restrict: 'E',
    scope: true,
    replace: false,
    link: function(scope, element, attrs) {
      var scaffoldUrl = scope.entity.custom ? 'client/entity/' : 'entity/';
      scope.contentUrl = scaffoldUrl + scope.entityName + '/' + scope.entityName + '.list.html';
    },
    template: '<div ng-include src="contentUrl" include-replace></div>'
  };
});
