mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(): update dependencies
This commit is contained in:
@ -10,9 +10,9 @@ import { bindLifecycleEvents } from '../../providers/angular-delegate';
|
||||
})
|
||||
export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
|
||||
private activated: ComponentRef<any>|null = null;
|
||||
private activated: ComponentRef<any> | null = null;
|
||||
|
||||
private _activatedRoute: ActivatedRoute|null = null;
|
||||
private _activatedRoute: ActivatedRoute | null = null;
|
||||
private name: string;
|
||||
private stackCtrl: StackController;
|
||||
|
||||
@ -64,7 +64,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
|
||||
get isActivated(): boolean { return !!this.activated; }
|
||||
|
||||
get component(): Object {
|
||||
get component(): object {
|
||||
if (!this.activated) {
|
||||
throw new Error('Outlet is not activated');
|
||||
}
|
||||
@ -78,7 +78,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
return this._activatedRoute as ActivatedRoute;
|
||||
}
|
||||
|
||||
get activatedRouteData() {
|
||||
get activatedRouteData(): any {
|
||||
if (this._activatedRoute) {
|
||||
return this._activatedRoute.snapshot.data;
|
||||
}
|
||||
@ -117,7 +117,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {
|
||||
async activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null) {
|
||||
if (this.isActivated) {
|
||||
throw new Error('Cannot activate an already activated outlet');
|
||||
}
|
||||
@ -128,7 +128,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
this.activated = enteringView.ref;
|
||||
} else {
|
||||
const snapshot = (activatedRoute as any)._futureSnapshot;
|
||||
const component = <any>snapshot.routeConfig !.component;
|
||||
const component = snapshot.routeConfig!.component as any;
|
||||
resolver = resolver || this.resolver;
|
||||
|
||||
const factory = resolver.resolveComponentFactory(component);
|
||||
@ -145,7 +145,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
enteringView = this.stackCtrl.createView(this.activated, activatedRoute);
|
||||
}
|
||||
|
||||
const {direction, animated} = this.navCtrl.consumeTransition();
|
||||
const { direction, animated } = this.navCtrl.consumeTransition();
|
||||
await this.stackCtrl.setActive(enteringView, direction, animated);
|
||||
this.activateEvents.emit(this.activated.instance);
|
||||
|
||||
@ -185,6 +185,7 @@ class OutletInjector implements Injector {
|
||||
return this.childContexts;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line
|
||||
return this.parent.get(token, notFoundValue);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
/**
|
||||
* @name NavParams
|
||||
* @description
|
||||
* NavParams are an object that exists on a page and can contain data for that particular view.
|
||||
* Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
|
||||
@ -37,7 +36,7 @@ export class NavParams {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param {string} param Which param you want to look up
|
||||
* @param param Which param you want to look up
|
||||
*/
|
||||
get(param: string): any {
|
||||
return this.data[param];
|
||||
|
@ -56,7 +56,7 @@ export class StackController {
|
||||
}
|
||||
|
||||
// stack setRoot
|
||||
if (direction === 0) {
|
||||
if (direction === 0) {
|
||||
this.views = [enteringView];
|
||||
return;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import { VirtualContext } from './virtual-utils';
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Directive({selector: '[virtualFooter]'})
|
||||
@Directive({ selector: '[virtualFooter]' })
|
||||
export class VirtualFooter {
|
||||
constructor(public templateRef: TemplateRef<VirtualContext>) {}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import { VirtualContext } from './virtual-utils';
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Directive({selector: '[virtualHeader]'})
|
||||
@Directive({ selector: '[virtualHeader]' })
|
||||
export class VirtualHeader {
|
||||
constructor(public templateRef: TemplateRef<VirtualContext>) {}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import { VirtualContext } from './virtual-utils';
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Directive({selector: '[virtualItem]'})
|
||||
@Directive({ selector: '[virtualItem]' })
|
||||
export class VirtualItem {
|
||||
constructor(public templateRef: TemplateRef<VirtualContext>, public viewContainer: ViewContainerRef) {}
|
||||
}
|
||||
|
@ -41,15 +41,15 @@ export class VirtualScroll {
|
||||
]);
|
||||
}
|
||||
|
||||
private nodeRender(el: HTMLElement|null, cell: any, index: number) {
|
||||
private nodeRender(el: HTMLElement | null, cell: any, index: number) {
|
||||
if (!el) {
|
||||
const node = this.itmTmp.viewContainer.createEmbeddedView(
|
||||
const view = this.itmTmp.viewContainer.createEmbeddedView(
|
||||
this.getComponent(cell.type),
|
||||
{ $implicit: null, index },
|
||||
index
|
||||
);
|
||||
el = getElement(node);
|
||||
(el as any)['$ionView'] = node;
|
||||
el = getElement(view);
|
||||
(el as any)['$ionView'] = view;
|
||||
}
|
||||
const node = (el as any)['$ionView'];
|
||||
const ctx = node.context as VirtualContext;
|
||||
|
Reference in New Issue
Block a user