I created a lightning component that will house a drag and drop file uploader and handle all of its goings ons.
Then I bring it into my Visualforce page like so:
$Lightning.use('c:DropZoneComponentApp', function(){
$Lightning.createComponent('c:DropZoneComponent', {eventId: currentEvent.taskId}, 'eventDropzone', function(cmp){
console.log('Component Created!', cmp);
console.log(cmp.get('v.fileInfo'));
//console.log(cmp.testingFunction()); <--Doesn't work
});
});
I now want to be able to call functions of the lightning component when a button is pressed on my Visualforce page. just doing cmp.functionName() does not seem to work.
How do you accomplish this? I am OK triggering the AuraEnabled controller methods for the component, or the javascript controller methods.