app.directive('zlFile', function() {
  return {
    restrict: 'A',
    scope: {
      item: '=',
      var: '=',
      docid: '='
    },
    replace: false,
    link: function (scope, element, attrs) {
      if (scope.docid) {
        if (scope.docid._id) {
          scope.docid = scope.docid._id;
        }
      }
    },
    templateUrl: 'directives/document/file.html'
  };
});
