Posts

How to show index for an array in loop in the template of Meteor?

Show indexing in template of Meteor for a list of array in loop You can use something like this: Like you have a template name home.html with home template name Now you can write this code for indexing or index to show listing home.js var tot = 0; Template.home.helpers({   listIndex: function(num){     tot = tot+num;     return tot;   }  }); Template.home.destroyed  = function(){   tot = 0; }; Now you can call this function from your template home.html like this: {{listIndex 1}} Hope this will work for you :)

How to use if else condition in Meteor Template?

You can use if else condition in Meteor HTML Template by other option Here is one option to use it Like: You can use Helpers of meteor to use if else condition which you can use in your HTML file. Here is Example: Project/helpers/Spacebars.js You can write this code in this helper UI.registerHelper('addChangeClass', function(valchange) { if(valchange>1) { return "<span style='color:green;'>Yes</span>"; }else { return valchange; } });  Now you can use this function in your template HTML file <td align="right">{{{addChangeClass -34}}}</td> or <td align="right">{{{addChangeClass number}}}</td> I used {{{ three curly bracket to render HTML in Meteor HTML Template.   

How to Return HTML in Meteor Template?

Render HTML in Meteor Template Use {{{variable}}} instead of {{variable}} to make sure there should not escape. With the three curly brackets you can render HTML in meteor template.

Why video and page loading stops when Mouse cursor or keyboard is not active in Mozilla?

video and page loading stops when Mouse cursor or keyboard is not active in Mozilla Actually i was facing same problem that it stops working when i leave my mouse cursor idle. Actually after 33 version of Mozilla  this have bug which stop these thing while cursor or keyboard is not active. So to solve this problem to page loading and video stop in Mozilla you need to follow the instruction as below; So for this you have to download 30 version of Mozilla and install this version into your computer. This will work fine. Hope this is helpfull. Please leave a comment if this works.