feat(angular): adds DomController

fix #14286
This commit is contained in:
Manu Mtz.-Almeida
2018-04-11 21:39:14 +02:00
parent 12a27bc9d0
commit 6a31f3960a
3 changed files with 22 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ const PROVIDERS = [
p.NavController,
p.Platform,
p.Events,
p.DomController
];
@NgModule({

View File

@@ -0,0 +1,20 @@
import { Injectable } from '@angular/core';
@Injectable()
export class DomController {
read(cb: RafCallback) {
getQueue().read(cb);
}
write(cb: RafCallback) {
getQueue().write(cb);
}
}
function getQueue() {
const ionic = (window as any).Ionic;
return ionic.queue;
}
export type RafCallback = { (timeStamp?: number): void };

View File

@@ -11,3 +11,4 @@ export { Platform } from './platform';
export { PopoverController } from './popover-controller';
export { ToastController } from './toast-controller';
export { NavController } from './nav-controller';
export { DomController } from './dom-controller';