mercredi 16 septembre 2015

How do I configure the md-select component in ember-cli-materialize? What do the options mean?

The example code on the online demo site gives the following example:

{{md-select content=frameworks
    value=framework
    label="Framework"
    prompt="Please choose..."
    optionLabelPath="content.value"
    optionValuePath="content" class="col s12"}}

Is frameworks is some sort of Array on the model/route? I tried defining frameworks like this: frameworks: ["Option 1","Option 2"] and frameworks: [{text:"Option 1",value:"1"},{text:""Option 2"",value:"2"}] but I still get only the empty select element with the default placeholder.

How do the optionLabelPath and optionValuePath options work?

TLDR; How to configure the options (and associated values) on the material select element from ember-cli-materialize addon?




Aucun commentaire:

Enregistrer un commentaire