mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#68 PDFJS Mock and test
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<alfresco-viewer [urlFile]="'http://192.168.99.100:8080/share/proxy/alfresco/slingshot/node/content/workspace/SpacesStore/f7d0ef02-24ca-46e5-a05a-37d7d878142a/Energy_Bill_20May16.pdf'">
|
||||
<alfresco-viewer [urlFile]="(hrefFile)">
|
||||
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
||||
</alfresco-viewer>
|
@@ -27,7 +27,22 @@ declare let __moduleName: string;
|
||||
directives: [VIEWERCOMPONENT]
|
||||
})
|
||||
export class ViewerFileComponent {
|
||||
|
||||
hrefFile: string;
|
||||
|
||||
constructor() {
|
||||
console.log('constructor');
|
||||
let host = 'http://192.168.99.100:8080/';
|
||||
let nameFile = 'Energy_Bill_20May16.pdf';
|
||||
let workSpace = 'workspace/SpacesStore/01f144c6-bd6f-43ed-8b92-e417ad629467/';
|
||||
this.hrefFile = host + 'alfresco/s/slingshot/node/content/' + workSpace + nameFile + '?alf_ticket=' + this.getAlfrescoTicket();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the token from the local storage
|
||||
* @returns {any}
|
||||
*/
|
||||
private getAlfrescoTicket(): string {
|
||||
return localStorage.getItem('token');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user