1 ES6 template string does not work in $.ajax
2 normal code:
let title = 1;
let info = 2;
${title} //1
${info} //2
not shown if you put it in $.ajax, code:
$.ajax({
type: "get",
url: "xxxxx.json",
dataType: "json",
success: function(x) {
//xxxxx.jsondb
let db = x.data;
let title = db.title; //title 1
let info = db.info; //title 2
console.log(title); //
$("-sharpid").append("${title} -- ${info}"); //
}
});
Why is this?