const url = `${this.heroesUrl}/?id=${id}`;
What is the meaning of $ in given code. i do not know how to use $ sign in hero service example in http service. why use this $ ?
const url = `${this.heroesUrl}/?id=${id}`;
What is the meaning of $ in given code. i do not know how to use $ sign in hero service example in http service. why use this $ ?
It is a template literal:
Template literals are enclosed by the back-tick character instead of double or single quotes. Template literals can contain placeholders. These are indicated by the dollar sign and curly braces (
${expression}
).