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

Dynamic default value #530

Closed
paweleck opened this issue Oct 20, 2021 · 1 comment
Closed

Dynamic default value #530

paweleck opened this issue Oct 20, 2021 · 1 comment

Comments

@paweleck
Copy link

@prop({defaultValue: this.dyspName == 'NYC' ? '1' : '15'})
idDysp: string;

@prop()
dyspName: string;

Can I set default value dynamilly? Like above? It throws error for now

@ajayojha
Copy link
Member

@paweleck You can achieve the need by using the property of dynamicConfig. Please refer to this documentation.

I am closing this ticket as there is no further action on this. Please reopen the same if there is any issue :).

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

No branches or pull requests

2 participants