javascript - Angular Select Dropdown with an option to let the user add a custom option -


i have html select dropdown in form asks user pick question out of pre-selected security questions. (such "what's favorite city", "what's color of car" etc.)

how can add option list such "write own" , when user selects it, new input box shown user write his/her own question.

one strategy can think of create input element ng-show hide/show based on value of select. there better way it?

your best bet write custom directive simulate select box (likely using styled radio buttons), add option in there input. i've done similar several projects , thought isn't particularly difficult, there lot consider (including accessibility , keyboard controls).

or can find 1 of many open-source directives online. while might not you're looking ui-select might option.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -