這段在控制臺上提示報錯,Handlebars未定義
var t = $("#template").html();
console.log(t);
// f是handlebars編譯之后生成的函數(shù)
var f =Handlebars.compile(t);
console.log(f);
// 參數(shù)打他傳入之后的HTML的字符串
var h = f(data);
console.log(h);
$("#card3").html("woshi ");
var t = $("#template").html();
console.log(t);
// f是handlebars編譯之后生成的函數(shù)
var f =Handlebars.compile(t);
console.log(f);
// 參數(shù)打他傳入之后的HTML的字符串
var h = f(data);
console.log(h);
$("#card3").html("woshi ");
2017-08-18
實際按老師的寫的源碼! 添加了預(yù)加載圖標(biāo)! https://github.com/Mister-Yang/handlebars 記得點星關(guān)注哦!?。?!
2017-08-16