This package has been deprecated

Author message:

use @ng-bootstrap/ng-bootstrap

ng2-bs-dropdown
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

Angular 2 Bootstrap Dropdown

Install:
npm install ng2-bs-dropdown --save
Use:
component.js

import {DROPDOWN_DIRECTIVES} from 'ng2-bs-dropdown';
@Component({
  selector: 'example',
  directives: [DROPDOWN_DIRECTIVES],
  templateUrl: 'has-dropdown.html'
})
export class DropdownDemo { }

has-dropdown.html

<div class="dropdown">
  <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1">
    Dropdown
  </button>
  <div class="dropdown-menu" aria-labelledby="dropdownMenu1">
    <a class="dropdown-item" href="#">Action</a>
    <a class="dropdown-item" href="#">Another action</a>
    <a class="dropdown-item" href="#">Something else here</a>
  </div>
</div>

Each dropdown must have a parent element with class dropdown and children elements dropdown-toggle and dropdown-menu.

Package Sidebar

Install

npm i ng2-bs-dropdown

Weekly Downloads

5

Version

0.7.0

License

MIT

Last publish

Collaborators

  • scttcper