Every time I use the loadhtml method within show function, I receive a pending promise. Is there a way to obtain the value without needing a callback function? The code snippet is provided below for reference.
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);
}