Created
March 9, 2017 14:46
-
-
Save matthieu-D/f2f563ffed0a0ff92552bcdcef12d421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {HostListener, Component} from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
host: { | |
'(document:click)': 'onDocumentClicked($event)' | |
} | |
}) | |
export class AppComponent { | |
onDocumentClicked(ev) { | |
console.log('clicked', ev); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment