Get Free Trial
Get Free Trial

Is componentFolder mandatory for angularJS?

Answered
Kranthi asked on October 10, 2019

Hi Team,
 
Is the componentFolder property flexmonster mandatory for angularJS project.
Once we deploy our code all the js files in the project will be combined into a single .js file and we refer the that single .js file where whole java-script code required for the project will be.
In local we refer the component folder as /node_modules/flexmonster/ and it worked fine.
But when we deploy to other environments as we have only in one single JS file at last and getting the pop up error like “Check If the component folder parameter is defined correctly.”
 
Could you please let us know if we can use Flexmonster without the componentFolder property.
 
 
Thanks,
Kranthi
 

6 answers

Public
Kranthi October 10, 2019

Please find the attachment for the error we are facing in console.
My component folder path will be as below:
componentFolder: ‘/node_modules/flexmonster/’
 
But after Build at runtime we will have all the Flexmonster package related code in “itc.dependencies.js”. This file will also have some other third party JS code.
And all the application related JS code will be into another single file “itc.429.js” where component folder code will present.
 
The component Folder path will be correct in my local but in other environments we will be having only JS files as said above, Where my component folder line will not work.
 
Could you please suggest how to deal with this.
 
  
Thanks,
Kranthi
 
 
 
 
 

Public
Vera Didenko Flexmonster October 10, 2019

Hello, Kranthi,
 
Thank you for reaching out to us.
 
The componentFolder is not obligatory.
For your case, we kindly recommend referring to flexmonster.full.js instead of flexmonster.js.
The reason for this is that in flexmonster.full.js all Flexmonster’s dependencies (https://www.flexmonster.com/faq/#!flexmonster-dependencies) are included.
This should help to solve the problem that you are facing.
 
Please let us know how everything goes for you.
 
You are welcome to contact us in case of questions.
 
Best Regards,
Vera

Public
Kranthi October 11, 2019

Hi Vera,
I am facing issues when using flesmonster.full.js.
Issue:-
In my application, after adding a reference to ‘flexmonster.full.js’, flexmonster pivot grid loads fine but all the ‘underscore functions’ [ex: _.findWhere()] refer to the ‘flexmonster.full.js’ instead of the original reference. and as it can’t find a reference for the implementation in ‘flexmonster.full.js’of function it fails.
What I would like you to help me with is:
1) underscore functions [_.functionName() ] in my application, must not refer to the ‘flexmonster.full.js’ file.
2) could you help me with an un-minified version of the ‘flexmonster.full.js’, I feel it would be helpful for me if I could have a look at the same (if any similar problems were to come up in future….)
A fast turnaround on this would be much appreciated!!! I have to present the demo and don’t have much time left…
Many Thanks,
Kranthi

Public
Ian Sadovy Flexmonster October 11, 2019

Hello Kranthi,
 
Thank you for the details.
We have looked into your case and it seems that elasticsearch.js dependency inside flexmonster.full.js exposes _ variable that is causing the issues for you. Currnelty, it seems that you should add the reference with the original _ variable after the flexmonster.full.js . So, it will override the wrong reference.
 
As for the non-minified version, we do not provide it for the flexmonster.js library. As for the rest of the open-source dependencies, you can find non-minified versions of them in the appropriate repositories.
 
Please let us know if it helps.
 
Regards,
Ian

Public
Kranthi 4 days ago

Hi lan,
 
We have referenced after the flexmonster.full.js. Now the pivot is loading with data.
But we have facing issue with css it seems. The icons are not be displaying correctly.
Please find the attachment for the reference.
In console we got failed to load resource. 
 
In index.html we are referring flexmonster.full.js and flexmosnter.min.css.
Are we missing anything else. Could you please help.
 
Thanks,
Kranthi
 
 
 

Public
Vera Didenko Flexmonster 3 days ago

Hello, Kranthi,
 
Thank you for your reply.
 
We are glad to hear that the issue with underscore functions is resolved.
 
About the not found icon files, it seems that the theme/assets/ folder is missing. 
Although flexmonster.full.js includes the js dependencies, flexmonster.min.css requires the theme/assets/ folder to get the icons.
 
1) We kindly suggest adding the theme/assets/ folder with all of its contents to the same place where flexmonster.min.css is located in your project.
This folder can be found in the flexmonster/ folder inside the package that you downloaded from our website.
 
2) Another option is to configure your bundler to copy the theme/assets/ folder to the same place where flexmonster.min.css is located in your project.
 
Please let us know if this helps.
 
Best Regards,
Vera

Please login or Register to Submit Answer