user1557847
user1557847

Reputation: 51

Select2 using AngularUI

I am using select2 dropdown with angularUI. Its not working properly if I include jquery-ui.css file. The result div is not showing right below to select control.If I remove jquery-ui.css its working fine.

Please help!!!

Thanks

Upvotes: 1

Views: 635

Answers (2)

Mehmet Otkun
Mehmet Otkun

Reputation: 1384

Using jquery plugins with Angular.js generally couse some problem. There is an awesome select component of QuantumUI which develeped by http://angularui.net Hope you like

Upvotes: 0

Rohit
Rohit

Reputation: 5721

Try including the css provided by the select2 library. I have the following code in my HTML and it works for me.

<script type="text/javascript" src="javascripts/select2.min.js"></script>
<link href="stylesheets/select2.css" rel="stylesheet" type="text/css">

<select ui-select2="{'placeholder': 'Select an Student', 'width': '70%'}">
  <option data-placeholder="Select a Student"></option>
  <option ng-repeat = "student in students | unique:name" value="{{student.id}}" >
    {{student.name}}
  </option>
</select>

Hope it works for you too.

Upvotes: 1

Related Questions