{"id":28517389,"url":"https://github.com/allenfang/angular-bootstrap-dropdown","last_synced_at":"2025-07-15T10:34:39.690Z","repository":{"id":28162283,"uuid":"31663089","full_name":"AllenFang/angular-bootstrap-dropdown","owner":"AllenFang","description":"It's a angular directive for bootstrap dropdown and multi-select","archived":false,"fork":false,"pushed_at":"2017-03-17T13:51:04.000Z","size":242,"stargazers_count":10,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-06T00:32:57.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllenFang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-04T15:07:19.000Z","updated_at":"2018-07-31T04:27:27.000Z","dependencies_parsed_at":"2022-07-31T07:38:05.218Z","dependency_job_id":null,"html_url":"https://github.com/AllenFang/angular-bootstrap-dropdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AllenFang/angular-bootstrap-dropdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenFang%2Fangular-bootstrap-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenFang%2Fangular-bootstrap-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenFang%2Fangular-bootstrap-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenFang%2Fangular-bootstrap-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllenFang","download_url":"https://codeload.github.com/AllenFang/angular-bootstrap-dropdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllenFang%2Fangular-bootstrap-dropdown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265428941,"owners_count":23763663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T05:08:01.273Z","updated_at":"2025-07-15T10:34:39.675Z","avatar_url":"https://github.com/AllenFang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-bootstrap-dropdown\nIt's a angular directive for bootstrap dropdown, named 'bsDropdown'   \n\nThe bsDropdown include all basic function in dropdown, include set default value, and listen change etc.   \n\nAlso support multi-select on newest version.   \n\nangular-bootstrap-dropdown dependencies on AngularJS 1.2.x and Bootstrap 3   \n\nYou can see an online demo on [here](http://frozen-tundra-7264.herokuapp.com/examples/L8/#).   \n\n### Versions\n0.1.0 support basic function in bsDropdown, include use ng-model to set default value, and ng-change to listen change   \n\n0.1.1 add bootstrap divider in bsDropdown \n\n0.2.0 add bootstrap dropdown disabled and item disabled in bsDropdown   \n \n0.9.0(latest) add multi-select to bsDropdown!!   \n\n### Development\n```\n$ git clone https://github.com/AllenFang/angular-bootstrap-dropdown.git\n$ cd angular-practice-example\n$ npm install\n$ bower install\n```\nUse gulp to test the bsDropdown\n```\n$ npm test\nor\n$ node_modules/gulp/bin/gulp.js test\n```\n\n\n### Usage\nInclude the angular-bootstrap-dropdown library to your html page\n```\n\u003cscript src=\"bsDropdown.min.js\"\u003e\u003c/script\u003e\n```\nThe ```bsDropdown.min.js``` is in the dist folder.\nIn the next, include the ```ng.bs.dropdown``` to your angular module dependencies  \n```\nangular.module(\"demoApp\", ['ng.bs.dropdown'])\n```\nThen, you can go to use the angular-bootstrap-dropdown, below is a simple example  \n\nFirst of all, give an angular controller\n```\nangular.module(\"demoApp\", ['ng.bs.dropdown'])\n\t.controller(\"YearController\", function($scope){\n\t\t$scope.years = [\n\t\t\t\"2015\",\n\t\t\t\"2014\",\n\t\t\t\"2013\",\n\t\t\t\"2012\",\n\t\t\t\"2011\",\n\t\t\t\"2010\"\n\t\t];\n\t\t$scope.selectYear = $scope.years[2];  //current select item\n\t\t\n\t\t/*changeYear function will be called if dropdown change*/\n\t\t$scope.changeYear = function(){\n\t\t\tconsole.log(\"YearController say... \" + $scope.selectYear);\n\t\t}\n\t});\n```\n\nSo here is your partial html code\n```\n\u003cdiv ng-controller=\"YearController\"\u003e\n\t\t\t\u003ch4\u003eYou select {{selectYear}} ....\u003c/h4\u003e\u003cbr/\u003e\n\t\t\t\u003cdiv bs-dropdown \n\t\t\t     bs-dropdown-display=\"MyDropDown\" \n\t\t\t\t bs-dropdown-items=\"years\" \n\t\t\t     ng-model=\"selectYear\" \n\t\t\t     ng-change=\"changeYear()\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Setting\nUse ```bs-dropdown-display``` attribute to display default text on dropdown if there is no any default value selected  \nUse ```bs-dropdown-items``` attribute to specify the dropdown options  \nUse ```ng-model``` to set the default selected value   \nUse ```ng-change``` to listen up the change event on dropdown  \nUse ```bs-dropdown-divider``` to specify the divider, for example bs-dropdown-divider=\"{{[2,5]}}\".   \nUse ```bs-dropdown-item-disabled``` to specify which option should be disabled,for example bs-dropdown-item-disabled=\"{{[2,5]}}\".   \nUse ```bs-dropdown-disabled``` to set dropdown disabled, for example bs-dropdown-disabled=\"true\".   \nUse ```bs-dropdown-multi``` to specify bsDropdown to be a multi-select dropdown.   ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallenfang%2Fangular-bootstrap-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallenfang%2Fangular-bootstrap-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallenfang%2Fangular-bootstrap-dropdown/lists"}