Questions tagged [meteor-blaze]

Blaze is the render system for Meteor

Blaze is the render system for since version 0.8. As of version 1.2 Meteor also supports and .

Meteor Blaze is a powerful library for creating live-updating user interfaces. Blaze fulfills the same purpose as Angular, Backbone, Ember, React, Polymer, or Knockout, but is much easier to use.

1573 questions
31
votes
3 answers

Meteor + Blaze - If else statement

Looking at this Using Blaze guide, it seems Blaze supports {{#if}} and {{else}} statements, but I have't seen examples of an if-else statement. Is this supported in Blaze? Or do I have to do an additional if block inside the else block, which can…
dayuloli
  • 13,791
  • 13
  • 58
  • 103
26
votes
2 answers

How to IF NOT inside of {{ #each }} template

How can I render this Meteor Blaze Template ? I would like to use the negative of the IF, but I don't find anywhere how to use it.
    {{#each pages}} {{#if (--NOT--) isCover }}
  • some content {{value}}
ncubica
  • 7,276
  • 7
  • 50
  • 67
22
votes
8 answers

Meteor: Access Template Helper (or variable) from another helper

How can I reference a template helper from another one? For example... Template.XXX.helpers({ reusableHelper: function() { return this.field1 * 25 / 100; //or some other result }, anotherHelper: function() { if…
Habib
  • 279
  • 1
  • 2
  • 9
18
votes
2 answers

Meteor package, how to add static files

I'm creating a package and, for the client side, I need to add some static files like fonts and images. After trying some outdated solution I found nothing seemed to work for me. How should I add those files? Create a public folder inside my…
bitIO
  • 334
  • 2
  • 10
17
votes
5 answers

How to get the parent template instance (of the current template)

Is there a clean way to get the parent template of the current template? Nothing is officially documented in Meteor's API. I'm talking about the Blaze.TemplateInstance, not the context (i.e. not Template.parentData).
Bogdan D
  • 4,473
  • 1
  • 27
  • 32
15
votes
1 answer

Meteor template Blaze how to return only first element of array

For example I have an array: var arr = ['a', 'b'] and want to get only first element in template
Ivan M
  • 529
  • 3
  • 13
14
votes
2 answers

event.target is undefined in events

How can one use each input values in events? Hope my below code will explain you well. HTML: