Hello guys, I want to select multiple values from dropdown list using comma seperated.i m attaching code .plz help me with this.
I am getting output as
,java
,net
That' my function
- $scope.getKeySkills = function(value) {
- if(value==null){
- console.log(value);
- $scope.form.data.keySkills = value;
- }
- else{
- $scope.form.data.keySkills = ","+value;
- }}
- <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 mb-2">
- <label for="validationCustom02">Key skills</label> <font
- color="red">*</font> <select class="form-control inline"
- ng-model="form.keySkill"
- ng-change="getKeySkills(form.keySkill)"
- ng-options="s.name as s.name for s in form.preload.keySkillsList"
- required style="cursor: pointer" id="basic">
- <option value="">--Key skills--</option>
- </select>
- <div class="valid-feedback">Looks good!</div>
- </div>
- <input type="hidden" ng-model="form.id" value="form.data.id">
- <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 mb-2">
- <label for="validationCustom01">key skills value</label><font
- color="red">*</font> <input type="text" class="form-control"
- id="validationCustom01" placeholder="values" value=""
- ng-change="getKeySkills(form.keySkill)" ng-model="form.keySkill">
- <div class="valid-feedback">Looks good!</div>
- </div>