Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exportAs to dropdown directives #785

Merged
merged 4 commits into from
Aug 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion components/dropdown/dropdown-menu.directive.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {Directive, ElementRef, Host, OnInit, HostBinding} from '@angular/core';
import {DropdownDirective} from './dropdown.directive';

@Directive({selector: '[dropdownMenu]'})
@Directive({
selector: '[dropdownMenu]',
exportAs: 'bs-dropdown-menu'
})
export class DropdownMenuDirective implements OnInit {
public dropdown:DropdownDirective;
public el:ElementRef;
Expand Down
5 changes: 4 additions & 1 deletion components/dropdown/dropdown-toggle.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import {global} from '@angular/core/src/facade/lang';
const MouseEvent = (global as any).MouseEvent as MouseEvent;
/* tslint:enable */

@Directive({selector: '[dropdownToggle]'})
@Directive({
selector: '[dropdownToggle]',
exportAs: 'bs-dropdown-toggle'
})
export class DropdownToggleDirective implements OnInit {
@HostBinding('class.disabled')
@Input() public isDisabled:boolean = false;
Expand Down
5 changes: 4 additions & 1 deletion components/dropdown/dropdown.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import {
} from '@angular/core';
import {dropdownService, NONINPUT} from './dropdown.service';

@Directive({selector: '[dropdown]'})
@Directive({
selector: '[dropdown]',
exportAs: 'bs-dropdown'
})
export class DropdownDirective implements OnInit, OnDestroy {
@HostBinding('class.open')
@Input()
Expand Down
10 changes: 8 additions & 2 deletions components/dropdown/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ import { DROPDOWN_DIRECTIVES } from 'ng2-bootstrap/components/dropdown';
### Annotations
```typescript
// directive Dropdown
@Directive({ selector: '[dropdown]' })
@Directive({
selector: '[dropdown]',
exportAs: 'bs-dropdown'
})
export class Dropdown implements OnInit, OnDestroy {
@HostBinding('class.open')
@Input() public get isOpen():boolean {}
Expand All @@ -32,7 +35,10 @@ export class Dropdown implements OnInit, OnDestroy {
}

// directive DropdownToggle
@Directive({ selector: '[dropdownToggle]' })
@Directive({
selector: '[dropdownToggle]',
exportAs: 'bs-dropdown-toggle'
})
export class DropdownToggle implements OnInit {
@HostBinding('class.disabled')
@Input() public isDisabled:boolean = false;
Expand Down