0
我有下面的代码,我试图从选定的值创建一个字符串。为什么价值没有得到在打字稿中分配?
this.selectedCategory = selectedvalue.name;
this.filter = '{category:${this.selectedCategory}}';
的this.filter
值是{category:${this.selectedCategory}}
而我期待的输出作为{category:Music}
。
其作为字符串处理插值。使用模板特定的引号。 – Nirus