Blaze.Each

Client

Blaze.Each(argFunc, contentFunc, [elseFunc])

import { Blaze } from 'meteor/blaze' Source

Constructs a View that renders contentFunc for each item in a sequence.

Arguments

argFunc Function

A function to reactively re-run. The function can return one of two options:

  1. An object with two fields: '_variable' and '_sequence'. Each iterates over '_sequence', it may be a Cursor, an array, null, or undefined. Inside the Each body you will be able to get the current item from the sequence using the name specified in the '_variable' field.

  2. Just a sequence (Cursor, array, null, or undefined) not wrapped into an object. Inside the Each body, the current item will be set as the data context.

contentFunc Function

A Function that returns renderable content.

elseFunc Function

A Function that returns renderable content to display in the case when there are no items in the sequence.

doc_Meteor
2016-05-29 17:17:58
Comments
Leave a Comment

Please login to continue.