File download button for ng2 document list

- ability to download the file from the list
- ability to toggle download button via attributes
This commit is contained in:
Denys Vuika
2016-04-16 08:55:07 +01:00
parent 0625bf8116
commit 549755ecf4
3 changed files with 45 additions and 9 deletions

View File

@@ -28,6 +28,10 @@ export class AlfrescoService {
return this._host + '/alfresco/service/api/node/' + document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&ph=true&lastModified=1';
}
getContentUrl(document: DocumentEntity) {
return this._host + '/alfresco/service/' + document.contentUrl;
}
private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console