Loading...

ff-class

< Back To docs

Purpose

The ff-class attribute allows you to add a css class to an element. Values beginning with _ & # are special values for greater control.

Simple class

HTML


            

Result

I'm red when this div has class 'isImportant'

Firebase emulator

  • isImportant: {{isImportant}}
  • In this example, if isImportant is truthy

    Hash class

    HTML

    
                

    Result

    make red
    clear
    I'm red when this div has class 'red'

    In this example, if the url contains the hash #red, the class red will be added to the div. Notice this example has no Firebase emulator because changing the hash has no effect on firebase or the view-model.

    ff-class="_selected"

    _selected will add the class selected when the list item is selected. _not-selected will add the class not-selected when the list item is not selected. You are responsible to setup the css class rules to hide and show the proper row.

    See ff-select attribute

    Other resources

    < Back To docs