字符串模板编译成js有多余的/和中文编码的问题
let divH = `<div class="pull-left"> <span> <a href="#">程序“猿”</a> </span> </div>`
上述typescript代码
var divH = "<div class=\"pull-left\">\n<span>\n<a href=\"#\">\u7A0B\u5E8F\u201C\u733F\u201D</a>\n</span>\n</div>";
上述编译后的js代码
let divH = `<div class="pull-left"> <span> <a href="#">程序“猿”</a> </span> </div>`
上述typescript代码
var divH = "<div class=\"pull-left\">\n<span>\n<a href=\"#\">\u7A0B\u5E8F\u201C\u733F\u201D</a>\n</span>\n</div>";
上述编译后的js代码
2016-12-27
举报