ANGULARJS implementation drop-down box multiple selection

Source: Internet
Author: User

Talk not much, directly on the dry.

You definitely need the dropdown plugin. Must be introduced is the attention sequence

Select2.css
Select2-bootstrap.css
Select2.min.js
Angular.min.js
Angular-select2.js

OK, then just write a piece of code on the OK, as follows
<input select2 select2-model= "entity.brandids"  config= "brandlist" multiple placeholder= "select brand (optional)" class= " Form-control ">

Explain what it means,

Select2-model means that you will automatically place the selected value on this variable.
Config  means that the data source of the drop-down box  must conform to the format:
$scope. Config3 = {        data: [{ID:1,text: ' Bug '},{id:2,text: ' Duplicate '},{id:3,text: ' Invalid '},{id:4,text : ' Wontfix '}]        //  Other configuration slightly, you can go to see the AJAX configuration in the built-in configuration    };
Multiple means you can choose more than one.

OK, okay.

ANGULARJS implementation drop-down box multiple selection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.