fuse-angular/src/app/main/content/apps/file-manager/file-manager.component.ts
2017-08-18 14:50:19 +03:00

30 lines
724 B
TypeScript

import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { FileManagerService } from './file-manager.service';
@Component({
selector : 'fuse-file-manager',
templateUrl : './file-manager.component.html',
styleUrls : ['./file-manager.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class FuseFileManagerComponent implements OnInit
{
selected: any;
pathArr: string[];
constructor(private fileManagerService: FileManagerService)
{
}
ngOnInit()
{
this.fileManagerService.onFileSelected.subscribe(selected => {
this.selected = selected;
this.pathArr = selected.location.split('>');
});
}
}