formly-js / angular-formly-website

The website for angular-formly
http://angular-formly.com
18 stars 26 forks source link

New Example: Options adjustment based on separate field (same model) #36

Closed ghost closed 9 years ago

ghost commented 9 years ago

I would like an example that demonstrates: Changing of 'options' object for a field based on the value selected for a different field within the same model.

Sample scenario being if field1 was of type radio with 2 radio options. If I select radio option1, the options available for field2 would change to a different set than what would be displayed if I had selected radio option2.

kentcdodds commented 9 years ago

These two examples will probably get you most of the way there:

http://angular-formly.com/#/example/other/filter-select http://angular-formly.com/#/example/other/cascaded-select

Let me know if that's not enough.

ghost commented 9 years ago

Thanks for the quick reply Kent. Got it to work using expressionProperties. I appreciate the help.