I can't seem to find what the following syntax means in Angular (or perhaps it's just Javascript):
name() {
return ${this.firstName} ${this.lastName};
}
specifically the ${...}?
Is it an Angular thing or is it just Javascript?
-thanks
These are known as Template literals allowing you to essentially inject expressions into a multiline string without any messy concatenation, but you must enclose them inside back-ticks.
name() {
return `${this.firstName} ${this.lastName}`;
// as opposed to this.firstName + ' ' + this.lastName
}