mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1066] Improved files preview (#173)
* preview files child route * fix previewing root files (personal)
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { Subscription } from 'rxjs/Rx';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
@@ -45,6 +45,7 @@ export class SharedFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private content: ContentManagementService,
|
||||
private apiService: AlfrescoApiService,
|
||||
preferences: UserPreferencesService) {
|
||||
@@ -68,7 +69,7 @@ export class SharedFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
this.apiService.nodesApi.getNode(link.nodeId).then(
|
||||
(node: MinimalNodeEntity) => {
|
||||
if (node && node.entry && node.entry.isFile) {
|
||||
this.router.navigate(['/preview', node.entry.id]);
|
||||
this.router.navigate(['./preview', node.entry.id], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user