fix(tap-click): disabling it in server rendering

This commit is contained in:
Manu Mtz.-Almeida
2018-01-23 18:42:35 +01:00
parent f47c5f9cf1
commit fbf0059219

View File

@ -25,11 +25,15 @@ export class TapClick {
passive = true;
attachTo = 'document';
@Prop({context: 'isServer'}) isServer: boolean;
@Prop({context: 'enableListener'}) enableListener: EventListenerEnable;
@Element() el: HTMLElement;
componentDidLoad() {
if (this.isServer) {
return;
}
this.gestureCtrl = Ionic.gesture = Ionic.gesture || new GestureController();
this.app = this.el.closest('ion-app') as HTMLIonAppElement;