Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

ClickOutsideModule not working inside an anchor #15

Closed
jacopolanzoni opened this issue Aug 30, 2017 · 1 comment
Closed

ClickOutsideModule not working inside an anchor #15

jacopolanzoni opened this issue Aug 30, 2017 · 1 comment

Comments

@jacopolanzoni
Copy link

jacopolanzoni commented Aug 30, 2017

I import ClickOutsideModule in the following module:

@NgModule({
imports: [ClickOutsideModule],
declarations: [TopBarComponent, MyComponent]
})
export class TopBarModule { }

MyComponent is as follows:

@Component({
moduleId: module.id,
selector: 'my-component',
styleUrls: ['my-component.css'],
templateUrl: 'my-component.component.html'
})
export class MyComponent {
public onClickedOutside(event: Event) {
console.log('Clicked outside:', event);
}
}

with the template being:

< ul (clickOutside)="onClickedOutside($event)">Hello</ul >

Nothing is printed on the console when I click outside the unsorted list.

@arkon
Copy link
Owner

arkon commented Aug 30, 2017

Works fine for me. Only notable thing is that you can't have spaces in your tags (although that should've given you an error):

<ul (clickOutside)="onClickedOutside($event)">Hello</ul>

@arkon arkon closed this as completed Sep 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants