Very Simple AngularJS Dropdown displaying a list of values with multiselect checkboxes
I would like to make a dropdown with a list of values, where one can multiselect among these values with a checkbox on each value in the dropdown list. I want to be able to react to the event when one checks or unchecks the checkbox for one of the values I display in dropdown.
I would like the solution to be as simple as possible, so if it can be made without some custom directive, or third party library. I would prefer that.
So basically I just want to display a totally plain AngularJS drop down, with a check box for each value in the dropdown list. Something like just adding a checkbox to it and make it able to perform multiselect. The dropdown should also be scrollable. https://docs.angularjs.org/api/ng/directive/select
I have found some more complex solutions to give you an idea about what I want:
enter code here
https://codepen.io/elmahdim/pen/hlmri
enter code here
https://jsfiddle.net/michaeldeongreen/22et6sao/9/
But I find these solutions too complex and would like something really simple if possible.
- solution you describe sounds interesting to me. The only thing I need to get that solution to work for me, is to enclose the
- code in something which will make it behave like a dropdown, in the fashion, I just described. Do you have knowledge of any directive or construct which can give me that desired mode of behavior?
– Rune Hansen Nov 25 '18 at 13:13