How to know what the currently selected folder/directory path is using a navigationpanel

Hi,

In Filemanager, I would like to know what the currently selected (selected in navigationpanel) folder directory path is, without selecting a file/folder within the "view" panel.


greetings,

Laurens


1 Reply 1 reply marked as answer

SM Shalini Maragathavel Syncfusion Team July 20, 2021 02:21 PM UTC

Hi Laurens, 

Greetings from Syncfusion support. 

Based on your query, we suspect that you need to find the current folder location of File Manager component. You can get the current folder using the path property of File Manager component as demonstrated in the below code snippet, 
App.component.html 

<button (click)="click($event)"> Get Current File Path</button> 

<div class="sample-container"> 
        <ejs-filemanager #file id='overview' [ajaxSettings]='ajaxSettings' [view]='view'> 
        </ejs-filemanager> 
</div> 
-------------------------------------------------------
App.component.ts 

export class AppComponent { 

  click() { 
    var currentPath = this.file.path; 
    console.log(currentPath); 
  } 

In the above sample, we have get the current folder path in an external button click.

Please find the below sample for your reference, 
Shalini M. 


Marked as answer
Loader.
Up arrow icon