1
私は角型2をTypescriptで学んでいます。 私は非常に混乱している例を見つけました。ここでは、上記の例では$を使用して、{}の重要性は、今まで私はいつもにthis.thingを使用しているもの
component.ts
getValidation(state:any, thingName?: string) {
let thing: string = state.path || thingName;
let messages : string[] = [];
messages.push(`You must enter a **${thing}**`);
}
で
それを行きます任意の変数を使用しますか?
https://developers.google.com/web/updates/2015/01/ES6-Template-Strings – yurzui
これはJS ES6でも見られる文字列補間です。 – Tik