Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Getting Started

Victor Heng edited this page Sep 1, 2015 · 24 revisions

Requirements

  • Angular >=1.2.18
  • ngSanitize module
  • jQuery ( optional for older browser support )

Browser compatibility starting at Internet Explorer 8 and Firefox 3.6.

Installing

There are multiple ways of adding the required files:

  1. Clone, build the repository, and include the files

  2. Link to a CDN

  3. Install via Bower and include files

    bower install angular-ui-select

reference the scripts

  • bower_components/ui-select/dist/select.js
  • bower_components/ui-select/dist/select.css

For IE8 / FF3.6 support you must include:

  <!--
    IE8 support, see AngularJS Internet Explorer Compatibility http://docs.angularjs.org/guide/ie
    For Firefox 3.6, you will also need to include jQuery and ECMAScript 5 shim
  -->
  <!--[if lt IE 9]>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.2.0/es5-shim.js"></script>
    <script>
      document.createElement('ui-select');
      document.createElement('ui-select-match');
      document.createElement('ui-select-choices');
    </script>
  <![endif]-->

For RequireJS, your setup might look like:

require.config({
    paths: {
        'angular': 'bower_components/angular/angular',
        'angular-ui-select': 'bower_components/angular-ui-select/dist/select'
    },
    shim: {
        'angular-ui-select': ['angular']
    }
});

Include the ui.select and ngSanitize modules in your application

var module = angular.module('myapp', ['ui.select', 'ngSanitize']);

Clone this wiki locally