I'm completely new to Angular and TypeScript and doing a tutorial (tour of heroes).
There the following line occurs:
const url = `${this.heroesUrl}/${id}`;
It makes a string (?) from
private heroesUrl = 'api/heroes';
and the id:number which is passed as an argument to the function.
I get what happens here, but I don't get the syntax. Why do I use the $ and why the brackets?
I would have expected something like this:
const url = heroesUrl + id.toString();