The time now is {{tim}}.
.js code here…
if (Meteor.isClient) {
// counter starts at 0
var dt = new date();
Template.hello.helpers({
tim: dt.tostring()
});
}
if (Meteor.isServer) {
}
The time now is {{tim}}.
.js code here…
if (Meteor.isClient) {
// counter starts at 0
var dt = new date();
Template.hello.helpers({
tim: dt.tostring()
});
}
if (Meteor.isServer) {
}
My html code is
my_first_app{{> hello}}
The time now is {{tim}} .
My .js code is
if (Meteor.isClient) {
// counter starts at 0
var dt = new Date();
Template.hello.helpers({
tim: dt.tostring()
});
}
if (Meteor.isServer) {
console.log(“I am the server”);
}
then also time is not showing… what to do next…
did you try this?
Template.hello.helpers({
tim: function () {
var dt = new Date();
return dt.toString();
}
});