how the js and css files are mapped to a component from ui.frontend?
Solved! Go to Solution.
Views
Replies
Total Likes
There is no mapping is required. Using ClientLibs categories adding the JS and CSS under /apps/<project>/cleintlibs. And then while writing the css use a parent class name like cmp-<component_name> that work as prefix with all css and JS(ref screenshot 1 below).
Then in component html use the same prefix classname with all your classes. Like below screenshot 2.
screenshot 1:
screenshot 2:
Hi Sravanan,
I went through the documentation it's there about adding clientlibs to the template but for a specific component how to add css / js from ui.frontend.
Is it based on the name of the css and js files with component's name?
There is no mapping is required. Using ClientLibs categories adding the JS and CSS under /apps/<project>/cleintlibs. And then while writing the css use a parent class name like cmp-<component_name> that work as prefix with all css and JS(ref screenshot 1 below).
Then in component html use the same prefix classname with all your classes. Like below screenshot 2.
screenshot 1:
screenshot 2:
no from ui.frontend not from ui.apps.
I answered from ui.frontend only. Read carefully and browse the project.
Views
Likes
Replies