Giter Club home page Giter Club logo

md-chips-select's Introduction

Bower version npm version

The Angularjs module - Learn from Angular Material, and add a multi-select menu to md-chips. Demo in Codepen

Prerequisites:

angular.js, angular-animate.js

You can install the package via npm

npm install md-chips-select

or via bower

bower install md-chips-select

Include the md-chips-select.js and md-chips-select.css in the HTML file

In HTML:

```html ``` ng-model (required): The array to store the selected items
select-items (required): The array of the items in the select list
main-title (optional): The attributes seperated by space. It will combine all value of the attributes as the title of the list item. If the main-title is not given, there must be one attibute named "title" in the select-items array

Ex: main-title = "name id" It will combine the value of the attribute "name" and "id" (See the example below)

In javascript:

Inject the modules "ngAnimate" & "md.chips.select" when you initialize the app.
Ex:

angular.module("yourApp", ['ngAnimate', 'md.chips.select']);   

Add an array for ngModel (selected) in your controller

Ex:

$scope.selectedItems = []

Add an array for select-items

Ex:

$scope.listItems = [{    
      name: "Mini Cooper",    
      id: 0     
    }, {      
      name: "Lexus IS250",      
      id: 1      
    }, {      
      name: "Ford F150",     
      id: 2   
    }, {   
      name: "Toyota Prius",   
      id: 3   
    }];

Contributing

Feel free to improve the plugin and send us a pull request.
Thanks for all the contributors.

md-chips-select's People

Contributors

nch3ng avatar qqnc avatar kodymer avatar jalafel avatar sangtraceur avatar

Watchers

James Cloos avatar  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.