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:
-
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.
-
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.
Please login to continue.