chore(cleanup): remove unused code

This commit is contained in:
Adam Bradley
2018-03-06 19:56:53 -06:00
parent 7b264f983b
commit a1f942d45e
18 changed files with 6 additions and 1320 deletions

View File

@@ -1,45 +0,0 @@
import {
ComponentFactoryResolver,
Directive,
ElementRef,
Injector,
Type,
} from '@angular/core';
import { FrameworkDelegate } from '@ionic/core';
import { AngularComponentMounter, AngularEscapeHatch } from '..';
@Directive({
selector: 'ion-nav',
})
export class IonNav implements FrameworkDelegate {
constructor(
public elementRef: ElementRef,
protected angularComponentMounter: AngularComponentMounter,
protected cfr: ComponentFactoryResolver,
protected injector: Injector
) {
this.elementRef.nativeElement.delegate = this;
}
attachViewToDom(elementOrContainerToMountTo: HTMLIonNavElement,
elementOrComponentToMount: Type<any>,
data?: any,
classesToAdd?: string[],
escapeHatch: AngularEscapeHatch = {}): Promise<any> {
// wrap whatever the user provides in an ion-page
const cfr = escapeHatch.cfr || this.cfr;
const injector = escapeHatch.injector || this.injector;
return this.angularComponentMounter.attachViewToDom(elementOrContainerToMountTo,
null, elementOrComponentToMount, cfr, injector, data, classesToAdd);
}
removeViewFromDom(parentElement: HTMLElement, childElement: HTMLElement) {
return this.angularComponentMounter.removeViewFromDom(parentElement, childElement);
}
}