I have a requirement to create label dynamically in a Lightning controller I tried the below code - But not working.
DivMethod : function(component, event,helper)
{
//Calling as per JS syntax
$("#div").append('<a onclick = " HyperlinkMethod() " >Some text</a>');
//Calling as per Aura syntax --- this is working if it is defined in component. but not if created in controller
$("#div").append('<a onclick = "{!c.HyperlinkMethod }" >Some text</a>');
},
HyperlinkMethod : function(component, event,helper) {
alert("Hello");
},