Answer the question
In order to leave comments, you need to log in
How to do select validation in angularjs?
Hello everyone, here is the select code:
<div class="form-group">
<div class="required info ng-hide" ng-show="createForm.tag.$error.required">Required field</div>
{!! Form::label('tags', 'Tags*:') !!}
<select name="tags[]" id="tags" ng-model="tag" multiple="multiple" required class="form-control select2">
@foreach($tags as $tag)
<option label="tag" value="{{ $tag['id'] }}">{{ $tag['name'] }}</option>
@endforeach
</select>
</div>
Answer the question
In order to leave comments, you need to log in
<script>window.settings.tags={!! $tags !!};</script>
<select name="tags[]" id="tags" ng-model="tag" multiple="multiple"
required class="form-control select2" ng-options="vm.tags"></select>
vm = this;
vm.tags = $window.settings.tags;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question