leven.steve
Posts: 0
Joined: Sun Mar 04, 2012 4:01 pm

How to add a list to an OPTION component

Can you please explain how to setup an "option" UI component?
I have a list retrieved from the DB list service in a local scope variable but if I set ng-option etc. it generates an error (in the dev console) when it loads the page. I cannot find any "appery" documentation or example to illustrate how to use it and the Angular docs are not specific enough for which ng- paramater to set and to which component in Appery.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to add a list to an OPTION component

Hello Steve,

Could you please provide us with a screenshot of the error that you get?

leven.steve
Posts: 0
Joined: Sun Mar 04, 2012 4:01 pm

How to add a list to an OPTION component

I can try and replicate but really my question is how do I setup an OPTION component?

Like the SELECT component you have the outer SELECT and then the inner select items.

With SELECT I set the select component properties ng-model to a scope var to get the selected value, ng-options to item.description for item in list and ng-change to a function to do stuff if the selection changes, where I can pickup the model var with the new value. And then the inner SelectOption1 has some text like "Select days"

So, with the OPTION component do I set that up in the same way?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How to add a list to an OPTION component

Hello Steve,

Please add that option to the scope variable "list", which you use in the select component. AngularJS will add an option automatically to the select component.

Return to “Issues”