{"id":23170162,"url":"https://github.com/gbuomprisco/ng2-material-dropdown","last_synced_at":"2025-04-05T15:08:57.319Z","repository":{"id":9547930,"uuid":"62243353","full_name":"Gbuomprisco/ng2-material-dropdown","owner":"Gbuomprisco","description":"Angular 2 Material-like Dropdown Component","archived":false,"fork":false,"pushed_at":"2023-01-07T02:18:02.000Z","size":2622,"stargazers_count":37,"open_issues_count":40,"forks_count":52,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T14:11:23.213Z","etag":null,"topics":["angular","angular-components","material-components","material-design"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Gbuomprisco.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":"2016-06-29T17:06:02.000Z","updated_at":"2023-08-27T07:39:34.000Z","dependencies_parsed_at":"2023-01-13T15:25:33.193Z","dependency_job_id":null,"html_url":"https://github.com/Gbuomprisco/ng2-material-dropdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gbuomprisco%2Fng2-material-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gbuomprisco%2Fng2-material-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gbuomprisco%2Fng2-material-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gbuomprisco%2Fng2-material-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gbuomprisco","download_url":"https://codeload.github.com/Gbuomprisco/ng2-material-dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353746,"owners_count":20925329,"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":["angular","angular-components","material-components","material-design"],"created_at":"2024-12-18T03:26:04.259Z","updated_at":"2025-04-05T15:08:57.301Z","avatar_url":"https://github.com/Gbuomprisco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular2 Dropdown Component\n\nMaterial-like dropdown component for Angular2.\n\nNB: This repository is currently unmaintained. Please fork or use Angular Material's module, it's better.\n\n## Install\n\n    npm install ng2-material-dropdown --save\n\n## Usage\n\nOnce installed, import the directives and use it them your container component:\n\n```html\n\u003cng2-dropdown\u003e\n    \u003cng2-dropdown-button\u003e\n        Open Menu\n    \u003c/ng2-dropdown-button\u003e\n    \u003cng2-dropdown-menu\u003e\n        \u003cng2-menu-item *ngFor=\"let page of pages\"\u003e\n            {{ page }}\n        \u003c/ng2-menu-item\u003e\n\n        \u003cdiv class='ng2-menu-divider'\u003e\u003c/div\u003e\n\n        \u003cng2-menu-item\u003e\n            With Divider\n        \u003c/ng2-menu-item\u003e\n    \u003c/ng2-dropdown-menu\u003e\n\u003c/ng2-dropdown\u003e\n```\n\n```javascript\n// import module\nimport { Ng2DropdownModule } from 'ng2-material-dropdown';\n\n@NgModule({\n    imports: [ Ng2DropdownModule ]\n    // ..\n})\nexport class MyModule {}\n```\n\n## API\n\n`ng2-dropdown`\n- **`dynamicUpdate`** - **`[?boolean]`** : option to disable the dynamic update of the position on scroll events (defaults to `true`)\n- **`onItemSelected()`** - **`[(onItemSelected($event)]`** : event that emits the currently selected/hovered item\n- **`onItemClicked()`** - **`[(onItemClicked($event)]`** : event that emits the item clicked on\n- **`onShow()`** - **`[(onItemClicked($event)]`** : event that emits when the dropdown gets shown\n- **`onHide()`** - **`[(onItemClicked($event)]`** : event that emits when the dropdown gets hidden\n\n`ng2-dropdown-menu`\n- **`focusFirstElement`** - **`[?boolean]`** : by default the first element is immediately focused. You can disable by setting this option to false\n- **`width`** - **`[?number]`**: this determines the width of the menu. Possible values are 2, 4 and 6. By default, this is set to 4\n- **`offset`** - **`[?string]`**: offset to adjust the position of the dropdown with absolute values\n- **`appendToBody`** - **`[?boolean]`** : by default the dropdown is appended to the body, but you can disable this by setting it to `false`\n\n\n`ng2-dropdown-button`\n- **`showCaret`** - **`[?boolean]`** : if present, a caret will be appended to the button's text\n\n`ng2-menu-item`\n- **`preventClose`** - `[?boolean]` : if present, this attribute prevents the menu to hide when the menu item is clicked\n- **`value` - `[?any]`** : any value that you may want to attach to a menu item. Useful for using this component with other components.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbuomprisco%2Fng2-material-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbuomprisco%2Fng2-material-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbuomprisco%2Fng2-material-dropdown/lists"}