When I call loadhtml method from show .I am always get a pending promise. How do I get value without a call back. Please find the code snip below.
async loadhtml(url: string) {
var data =$.get(url).then(response=>{
console.log("response=>",response)
return response
});
return await data
}
show() {
var data = this.loadhtml(require("../../template/template1.tpl"));
console.log("html content=> ",data);
}