I have a function that returns the contents of an html file, but it returns something like this:
Promise {<pending>}__proto__: Promise[[PromiseStatus]]: "resolved"[[PromiseValue]]: "<span>contendido</spab>"
How could I get PromiseValue
to do an innerHTML
I am clear that the promise returns to me
axios
const template = async(urlGet) => {
const retorno = axios.get(urlGet).then((e) => {
return e.data
})
return await retorno
}
console.log(template('miarchivo.html'))