ng2-material-dropdown

WebJar for ng2-material-dropdown

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

ng2-material-dropdown
Последняя версия

Последняя версия

0.10.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

ng2-material-dropdown
WebJar for ng2-material-dropdown
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/Gbuomprisco/ng2-material-dropdown

Скачать ng2-material-dropdown

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ng2-material-dropdown/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ng2-material-dropdown</artifactId>
    <version>0.10.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ng2-material-dropdown/
implementation 'org.webjars.npm:ng2-material-dropdown:0.10.1'
// https://jarcasting.com/artifacts/org.webjars.npm/ng2-material-dropdown/
implementation ("org.webjars.npm:ng2-material-dropdown:0.10.1")
'org.webjars.npm:ng2-material-dropdown:jar:0.10.1'
<dependency org="org.webjars.npm" name="ng2-material-dropdown" rev="0.10.1">
  <artifact name="ng2-material-dropdown" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ng2-material-dropdown', version='0.10.1')
)
libraryDependencies += "org.webjars.npm" % "ng2-material-dropdown" % "0.10.1"
[org.webjars.npm/ng2-material-dropdown "0.10.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : tslib jar [1.9.0,2)

Модули Проекта

Данный проект не имеет модулей.

Angular2 Dropdown Component

Material-like dropdown component for Angular2.

Install

npm install ng2-material-dropdown --save

Usage

Once installed, import the directives and use it them your container component:

<ng2-dropdown>
    <ng2-dropdown-button>
        Open Menu
    </ng2-dropdown-button>
    <ng2-dropdown-menu>
        <ng2-menu-item *ngFor="let page of pages">
            {{ page }}
        </ng2-menu-item>

        <div class='ng2-menu-divider'></div>

        <ng2-menu-item>
            With Divider
        </ng2-menu-item>
    </ng2-dropdown-menu>
</ng2-dropdown>
// import module
import { Ng2DropdownModule } from 'ng2-material-dropdown';

@NgModule({
    imports: [ Ng2DropdownModule ]
    // ..
})
export class MyModule {}

API

ng2-dropdown

  • dynamicUpdate - [?boolean] : option to disable the dynamic update of the position on scroll events (defaults to true)
  • onItemSelected() - [(onItemSelected($event)] : event that emits the currently selected/hovered item
  • onItemClicked() - [(onItemClicked($event)] : event that emits the item clicked on
  • onShow() - [(onItemClicked($event)] : event that emits when the dropdown gets shown
  • onHide() - [(onItemClicked($event)] : event that emits when the dropdown gets hidden

ng2-dropdown-menu

  • focusFirstElement - [?boolean] : by default the first element is immediately focused. You can disable by setting this option to false
  • width - [?number]: this determines the width of the menu. Possible values are 2, 4 and 6. By default, this is set to 4
  • offset - [?string]: offset to adjust the position of the dropdown with absolute values
  • appendToBody - [?boolean] : by default the dropdown is appended to the body, but you can disable this by setting it to false

ng2-dropdown-button

  • showCaret - [?boolean] : if present, a caret will be appended to the button's text

ng2-menu-item

  • preventClose - [?boolean] : if present, this attribute prevents the menu to hide when the menu item is clicked
  • value - [?any] : any value that you may want to attach to a menu item. Useful for using this component with other components.

Версии библиотеки

Версия
0.10.1
0.5.8
0.2.2