Git Product home page Git Product logo

angular-multi-select's Introduction

angular-multi-select

A multiple-select widget for AngularJS.

Mobile friendly: Uses checkboxes rather than <input type="multiple"> for each selection side.

Features:

  • Pass in an expression to represent the display of an item
  • Column headers customizable
  • (6/3/14) Supports a new attribute 'required-min' which adds form validation for a minimum number of selected values.
  • (6/5/14) If a 'title' expression is provided, it is evaluated to show a tooltip for each item
  • (7/2/14) Templates have been extracted so they can be easily overridden, a la angular-ui-bootstrap.

Usage: angular.module('myApp', ['multi-select', ...]);

Example:

<multi-select ng-model="user.roles" available="roles" selected-label="Current roles" 
    available-label="Available roles" display="r as r.roleName"
    title="r as r.roleDescription" config="selectConfig"></multi-select>

where the controller contains

$scope.roles = [
  {roleId: 1, roleName: "Administrator", roleDescription: "Can do a bunch of stuff"},
  {roleId: 2, roleName: "Super User", roleDescription: "Ultimate power!"}
];

$scope.user = {
  roles: [$scope.roles[0]]
};
  
$scope.selectConfig = {
  requiredMin: 1
};

More information here: http://blog.boxelderweb.com/2013/08/22/angularjs-multi-select-widget/

License: MIT

Updates

  • 8/22/14: Merged tests, fixed bug where async init data was sometimes improperly handled

angular-multi-select's People

Contributors

alalonde avatar stumpdk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.