diff --git a/components/dropdown/dropdown-menu.directive.ts b/components/dropdown/dropdown-menu.directive.ts index a68ec296f6..a6e3960a16 100644 --- a/components/dropdown/dropdown-menu.directive.ts +++ b/components/dropdown/dropdown-menu.directive.ts @@ -1,10 +1,16 @@ -import {Directive, ElementRef, Host, OnInit} from '@angular/core'; +import {Directive, ElementRef, Host, OnInit, HostBinding} from '@angular/core'; import {DropdownDirective} from './dropdown.directive'; @Directive({selector: '[dropdownMenu]'}) export class DropdownMenuDirective implements OnInit { public dropdown:DropdownDirective; public el:ElementRef; + + /* tslint:disable:no-unused-variable */ + @HostBinding('class.dropdown-menu') + public addClass:boolean = true; + /* tslint:enable:no-unused-variable */ + public constructor(@Host() dropdown:DropdownDirective, el:ElementRef) { this.dropdown = dropdown; this.el = el; diff --git a/components/dropdown/readme.md b/components/dropdown/readme.md index 8e7e97c3ae..269d571b46 100644 --- a/components/dropdown/readme.md +++ b/components/dropdown/readme.md @@ -8,7 +8,7 @@ import { DROPDOWN_DIRECTIVES } from 'ng2-bootstrap/components/dropdown'; ```html
- +
diff --git a/demo/components/dropdown/dropdown-demo.html b/demo/components/dropdown/dropdown-demo.html index 624e4b3cee..aff3c3e700 100644 --- a/demo/components/dropdown/dropdown-demo.html +++ b/demo/components/dropdown/dropdown-demo.html @@ -16,7 +16,7 @@ -