I have written a Email Exchange service in my local and deployed it as a bundle into AEM6.So my service is available now as an sling service.
I have consumed it in my jsp as follows.
EmailService es - sling.getService(EmailService.class);
But now in Aem6 I need to call the service in sightly on a button click which will be done using an ajax call.
Can you please let me know how I can consume an sling service on an ajax call.
Thanks, Esha