Loading...

ff-foreach

< Back To DOCS

Purpose

The ff-foreach attribute duplicates a section of markup for each entry in an array.

Sample: simple list

HTML


            

Result

  • {{_key}} number {{_value}}

Firebase emulator

  • sample
    • {{_key}}: {{_value}}
Expand the sample list in the Firebase emulator and notice the key value pairs. To access the key use {{_key}}. To access a primitive type (string, number, boolean, ...) use {{_value}}. If the value is an object, you can use the objects keys as in the example below.

Sample: list of objects

HTML


            

Result

  • {{firstName}} {{lastName}} - {{city}}

Firebase emulator

  • people
    • {{_key}}
      • {{_key}}: {{_value}}

Future Features

Firefight does not currently support nesting input or other elements that write to firebase inside ff-foreach.

Other resources

< Back To DOCS