6
I’m using a code that uses the dollar sign ($
) Javascript, only when using the cipher it gives error in the console and the code to fetch the data of an API ends up not working. What I need to do for Javascript to recognize the dollar and interpolate correctly?
async addRepository(event) {
event.preventDefault();
const repoTnput = this.inputEl.value;
if (repoTnput.length === 0)
return;
const response = await api.get('/repos/${repoInput}');
const { name, description, html_url, owner: { avatar_url } } = response.data;
// ...
}
@hkotsubo, how did you get this magic?
– Augusto Vasques
Thus: https://meta.stackexchange.com/q/437/401803
– hkotsubo