Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How can i use javascript to controller a component with AEM

Avatar

Level 1

Can i use Javascript to controller a component in AEM 6.4? How configure to build a script JS in UI.Frontend to Clientlib-site.JS? 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @thionor ,

 

ui.frontend has a "clientlib.config.js", which contains configuration to store generated Clientlib-site.JS in the ui.app repository.

You can modify this as per your project structure to store generated js file in your project.

 

If you want to use JavaScript controller in the HTL/sightly file, please refer to the below link for the same.

https://adobemarketingclub.com/2015/12/05/javascript-use-api-with-a-simple-component-in-sightly/

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi @thionor ,

 

ui.frontend has a "clientlib.config.js", which contains configuration to store generated Clientlib-site.JS in the ui.app repository.

You can modify this as per your project structure to store generated js file in your project.

 

If you want to use JavaScript controller in the HTL/sightly file, please refer to the below link for the same.

https://adobemarketingclub.com/2015/12/05/javascript-use-api-with-a-simple-component-in-sightly/