feat(angular): expose Ionic Gestures via GestureController (#19864)

* expose gestures thru angular

* run linter
This commit is contained in:
Liam DeBeasi 2019-11-08 10:35:52 -05:00 committed by GitHub
parent fce3e24600
commit 48a766246d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View File

@ -31,6 +31,7 @@ export { NavController } from './providers/nav-controller';
export { DomController } from './providers/dom-controller';
export { Config } from './providers/config';
export { AnimationController } from './providers/animation-controller';
export { GestureController } from './providers/gesture-controller';
// ROUTER STRATEGY
export { IonicRouteStrategy } from './util/ionic-router-reuse-strategy';

View File

@ -0,0 +1,14 @@
import { Injectable } from '@angular/core';
import { Gesture, GestureConfig, createGesture } from '@ionic/core';
@Injectable({
providedIn: 'root',
})
export class GestureController {
/**
* Create a new gesture
*/
create(opts: GestureConfig): Gesture {
return createGesture(opts);
}
}

View File

@ -34,7 +34,7 @@ export * from './components/virtual-scroll/virtual-scroll-interface';
export { Animation, AnimationBuilder } from './utils/animation/animation-interface';
export * from './utils/overlays-interface';
export * from './global/config';
export { Gesture, GestureDetail } from './utils/gesture';
export { Gesture, GestureConfig, GestureDetail } from './utils/gesture';
// Global aux types
export type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time';