Input and outputs, how to work with them to follow the naming convention of the Angular 2's styleguide?
问题 Before I knew any better I used to have my directive defined like this: ... inputs: [ 'onOutside' ] ... export class ClickOutsideDirective { @Output() onOutside: EventEmitter<any> = new EventEmitter(); } But then I read the styleguide and it said that you should not prefix your outputs with on since Angular 2 supports the on- syntax in the templates. So I'm trying to change it to something like: @Input() outsideClick: any; @Output() outsideClick: EventEmitter<any> = new EventEmitter();