I'm new to Meteor and I'm trying to figure out the difference between writing:
Template.main.folks =
function () {
return Clients.find();
};
and writing it using "helpers":
Template.main.helpers({
folks: function () {
return Clients.find();
});
Are they the same thing?
答案 0 :(得分:1)
没什么区别,但第一个很快就会被删除。如果你这样做,它仍然会运行,但会给你deprecated
警告