Skip to content

Commit

Permalink
fix(build): All @HostBinding and @HostListener should be public (#…
Browse files Browse the repository at this point in the history
…1086)

fixes #1080
  • Loading branch information
sarunint authored and valorkin committed Oct 6, 2016
1 parent 6f2517c commit 3691757
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions components/buttons/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export class ButtonRadioDirective implements ControlValueAccessor, OnInit {
@Input() public uncheckable:boolean;

@HostBinding('class.active')
private get isActive() {}
public get isActive() {}

@HostListener('click')
private onClick() {}
public onClick() {}
}
// directive ButtonCheckbox
@Directive({ selector: '[btnCheckbox][ngModel]' })
Expand All @@ -25,10 +25,10 @@ export class ButtonCheckboxDirective implements ControlValueAccessor, OnInit {
@Input() public btnCheckboxFalse:any;

@HostBinding('class.active')
private state:boolean = false;
public state:boolean = false;

@HostListener('click')
private onClick() {}
public onClick() {}
}
```

Expand Down
4 changes: 2 additions & 2 deletions components/modal/modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class ModalDirective implements AfterViewInit, OnDestroy {
// @HostBinding(`class.${ClassName.IN}`) private _addClassIn:boolean;

@HostListener('click', ['$event'])
protected onClick(event: any): void {
public onClick(event: any): void {
if (this.config.ignoreBackdropClick || this.config.backdrop === 'static' || event.target !== this.element.nativeElement) {
return;
}
Expand All @@ -83,7 +83,7 @@ export class ModalDirective implements AfterViewInit, OnDestroy {

// todo: consider preventing default and stopping propagation
@HostListener('keydown.esc')
protected onEsc(): void {
public onEsc(): void {
if (this.config.keyboard) {
this.hide();
}
Expand Down
2 changes: 1 addition & 1 deletion components/progressbar/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ProgressDirective implements OnInit {
@HostBinding('attr.max')
@Input() public get max():number {}

@HostBinding('class') private addClass = 'progress';
@HostBinding('class') public addClass = 'progress';
}

// class Bar implements OnInit, OnDestroy
Expand Down
8 changes: 4 additions & 4 deletions components/typeahead/typeahead.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class TypeaheadDirective implements OnInit {
private componentsHelper:ComponentsHelper;

@HostListener('keyup', ['$event'])
protected onChange(e:any):void {
public onChange(e:any):void {
if (this.container) {
// esc
if (e.keyCode === 27) {
Expand Down Expand Up @@ -109,22 +109,22 @@ export class TypeaheadDirective implements OnInit {
}

@HostListener('focus', ['$event.target'])
protected onFocus():void {
public onFocus():void {
if (this.typeaheadMinLength === 0) {
this.typeaheadLoading.emit(true);
this.keyUpEventEmitter.emit('');
}
}

@HostListener('blur')
protected onBlur():void {
public onBlur():void {
if (this.container && !this.container.isFocused) {
this.hide();
}
}

@HostListener('keydown', ['$event'])
protected onKeydown(e:KeyboardEvent):void {
public onKeydown(e:KeyboardEvent):void {
// no container - no problems
if (!this.container) {
return;
Expand Down

0 comments on commit 3691757

Please sign in to comment.