add alfresco core in viewer

This commit is contained in:
Eugenio Romano
2016-08-04 00:17:21 +01:00
parent e17604e47d
commit 0050a2cc13
9 changed files with 93 additions and 7 deletions

View File

@@ -20,6 +20,7 @@ import { PdfViewerComponent } from './pdfViewer.component';
import { ImgViewerComponent } from './imgViewer.component';
import { NotSupportedFormat } from './notSupportedFormat.component';
import { DOCUMENT } from '@angular/platform-browser';
import { AlfrescoAuthenticationService} from 'ng2-alfresco-core';
declare let __moduleName: string;
@@ -38,6 +39,9 @@ export class ViewerComponent {
@Input()
fileName: string = null;
@Input()
fileNodeId: string = null;
@Input()
mimeType: string = null;
@@ -56,7 +60,7 @@ export class ViewerComponent {
extension: string;
constructor(private element: ElementRef, @Inject(DOCUMENT) private document) {
constructor(private authService: AlfrescoAuthenticationService, private element: ElementRef, @Inject(DOCUMENT) private document) {
}
ngOnChanges(changes) {
@@ -71,7 +75,11 @@ export class ViewerComponent {
let filenameFromUrl = this.getFilenameFromUrl(this.urlFile);
this.displayName = this.fileName !== null ? this.fileName : filenameFromUrl;
this.extension = this.getFileExtension(filenameFromUrl);
} else if (this.fileNodeId) {
console.log('call api');
}
resolve();
});
}