Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression properties should be able to take function #148

Closed
mohammedzamakhan opened this issue Oct 20, 2016 · 3 comments
Closed

Expression properties should be able to take function #148

mohammedzamakhan opened this issue Oct 20, 2016 · 3 comments

Comments

@mohammedzamakhan
Copy link
Contributor

I tried function for expression properties, but I failed doing that, we need this feature for ng2-formly final.

         expressionProperties: {
            'templateOptions.options': function() {
              if (this.model.title === 'mr') {
                return [{
                  label: 'Male',
                  value: 'male'
                }, {
                  label: 'Female',
                  value: 'female'
                }];
              } else {
                return [{
                  label: 'Female',
                  value: 'female'
                }, {
                  label: 'Male',
                  value: 'male'
                }];
              }
            }
          }
@Riron
Copy link
Contributor

Riron commented Oct 27, 2016

A similar eval as this one would be nice - and nearly usable as is 😄

@lizarajesh
Copy link

How to disable an input using expressionProperties on a button click.?
If i given like this
"expressionProperties": {
"templateOptions.disabled": "true"
} it is working fine. But i would like to disable this on a button click.
It would great if u help me !!

@aitboudad
Copy link
Member

aitboudad commented Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants