Skip to content

Repository files navigation

Angular Multiple Selection Module

Simplest way to make your angular items selectable

Demo Page

See also angular-multiple-drag

##Installation

###Using npm

npm install angular-multiple-selection

###Using bower

bower install angular-multiple-selection

###From source

Download source from github.com

##Usage

  • Add multiple-selection.min.js file to your application
<scripttype="text/javascript" src="multiple-selection.min.js"></script>
  • Add module to your app angular.module('app', ['multipleSelection'])
  • Add multiple-selection-zone attribute to element where selectable items will be located
<divclass="row" multiple-selection-zone>
//Add selectable items here
</div>
  • Add multiple-selection-item attribute to each selectable item
<divmultiple-selection-item>Item can be selected</div>
  • Customize css

##How it works Each selectable item has it`s own angular scope with variables

NameDescription
isSelectabletrue if element can be selected
isSelectingtrue if element now selecting. It means it enters in selection rectangle when you dragging
isSelectedtrue if element selected

###How to customize

  • Add ng-class to your item
<divmultiple-selection-itemng-class="{'selecting': isSelecting ,'selected': isSelected}"></div>
  • Customizing .selecting and .selected in your css
.selected {
background-color: green !important;
}
.selecting {
background-color: yellow !important;
}
  • You can also customize your rectangle for selecting
.select-helper {
position: absolute;
border:1px dashed red;
background: red;
opacity:0.2;
}

About

Simplest way to make your angular items selectable

Resources

Stars

0 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages