We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Use e-filemanager-ajaxsettings tag (in .html file)

Thread ID:

Created:

Updated:

Platform:

Replies:

147299 Sep 5,2019 12:08 PM UTC Sep 10,2019 06:16 AM UTC Angular - EJ 2 3
loading
Tags: FileManager
Thijs
Asked On September 5, 2019 12:08 PM UTC

Hello,

When using the  e-js-filemanager-ajaxsetting tag in my (angular-component) html file, i get the console error 'e-filemanager-ajaxsettings' is not a known element:..... 

which module do I have to include so the e-js-filemanager-ajaxsetting is a known element?

My code: 

<ejs-filemanager id='filemanager'>
<e-filemanager-ajaxsettings
url="/Home/FileOperations?param={{data.id}}"
uploadUrl="/Home/Upload"
downloadUrl="/Home/Download"
getImageUrl="/Home/GetImage"
>
</e-filemanager-ajaxsettings>
</ejs-filemanager>

Narayanasamy Panneer Selvam [Syncfusion]
Replied On September 9, 2019 04:33 AM UTC

Hi Thijs, 
 
Greetings from Syncfusion support. 
 
We have checked your query and attached code snippet. We suspect that the ajax settings in FileManger is not mapped properly. Kindly refer the below snippet to bind the ajax setting property in angular file manager component. 
Add the below code in appp.component.html file. 
<ejs-filemanager id='default-filemanager' #filemanagerObj [ajaxSettings]='ajaxSettings'> 
</ejs-filemanager> 
 
 
Add the below code in app.component.ts file 
 public hostUrl: string = 'https://ej2services.syncfusion.com/production/web-services/'; 
 public ajaxSettings: object = { 
    url: this.hostUrl + 'api/FileManager/FileOperations', 
    getImageUrl: this.hostUrl + 'api/FileManager/GetImage' 
 }; 
 
 
Refer the below documentation link to bind the ajax settings property in file manager component. 
 
Please let us know if you need any further update on this. 
 
Regards,  
Narayanasamy P.  


Thijs
Replied On September 9, 2019 07:48 AM UTC

Hello Narayanasamy,

Thanks for your answer, I am using the solution you provided. a  disadvantage of this solution is that I can't bind the (dynamic) data in the ajaxsetting, but have to reset the ajaxSettings.Url in the ngOnInit of the .ts file:

ngOnInit() {
    if(this.careblock.dataId > 0)
    {
      this.ajaxSettings.url =  this.hostUrl + 'api/FileManager/FileOperations?clientId=' + this.careblock.dataId;
    }
  }

Will the ajaxsettings be mapped correctly for the filmanager in the future? and if so, can I be notified?

Kind regards,
Thijs Rutten


Ashokkumar Balasubramanian [Syncfusion]
Replied On September 10, 2019 06:16 AM UTC

Hello Thijs, 
 
We have checked your reported query of updating the ajaxSettings property in dynamically. By default, the File Manager component having the support for updating this property in dynamically. So, kindly follow the below suggested ways to bind the dynamic data for ajaxSettings URL. 
 
For your reference, we have prepared a simple sample to change the ajaxSettings URL for file manager component during button click by using file manager instance. Refer the below code snippet to change the ajaxSettings URL. 
 
onChange() { 
   if (this.data > 0) { 
       this.filemanagerInstance.ajaxSettings.url = 'https://ej2services.syncfusion.com/production/web-services/api/AzureFileManager/AzureFileoperations' 
    } 
} 
 
Refer the sample link below. 
 
 
Please check the sample and get back to us, if you require any further assistance on this. 
 
Regards, 
Ashokkumar B. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon