var app = new Vue({
el: '#main',
template: $("#products-template").text(),
data: {
loading: true,
products: []
},
ready: function() {
var self = this;
$.getJSON(url, function(fbresults){
self.products = fbresults.data;
self.loading = false;
});
}
});
var app = new Vue({
el= '#main',
template= $("#products-template").text(),
data= {
loading= true,
products= []
},
ready= function() {
var self = this;
$.getJSON(url, function(fbresults){
self.products = fbresults.data;
self.loading = false;
});
}
});
在上面的代码片段“=”以及“:”被使用,所以我们什么时候需要用=当使用:,目的是什么:主要是