mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
@@ -162,11 +162,11 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
}
|
||||
|
||||
function emitEvent(el: HTMLElement) {
|
||||
const event = new CustomEvent('ionRouterOutletActivated', {
|
||||
const ev = new CustomEvent('ionRouterOutletActivated', {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
});
|
||||
el.dispatchEvent(event);
|
||||
el.dispatchEvent(ev);
|
||||
}
|
||||
|
||||
class OutletInjector implements Injector {
|
||||
|
||||
@@ -39,7 +39,6 @@ export class StackController {
|
||||
const leavingView = this.getActive();
|
||||
this.insertView(enteringView, direction);
|
||||
await this.transition(enteringView, leavingView, direction, animated, this.canGoBack(1));
|
||||
|
||||
this.cleanup();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { IonicConfig } from '@ionic/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { appInitialize } from './app-initialize';
|
||||
@@ -133,7 +134,7 @@ const PROVIDERS = [
|
||||
imports: [CommonModule]
|
||||
})
|
||||
export class IonicModule {
|
||||
static forRoot(config?: { [key: string]: any }): ModuleWithProviders {
|
||||
static forRoot(config?: IonicConfig): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: IonicModule,
|
||||
providers: [
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Config as CoreConfig } from '@ionic/core';
|
||||
import { Config as CoreConfig, IonicConfig } from '@ionic/core';
|
||||
import { InjectionToken } from '@angular/core';
|
||||
import { IonicWindow } from '../types/interfaces';
|
||||
|
||||
|
||||
export class Config {
|
||||
|
||||
get(key: string, fallback?: any): any {
|
||||
get(key: keyof IonicConfig, fallback?: any): any {
|
||||
const c = getConfig();
|
||||
if (c) {
|
||||
return c.get(key, fallback);
|
||||
@@ -13,7 +13,7 @@ export class Config {
|
||||
return null;
|
||||
}
|
||||
|
||||
getBoolean(key: string, fallback?: boolean): boolean {
|
||||
getBoolean(key: keyof IonicConfig, fallback?: boolean): boolean {
|
||||
const c = getConfig();
|
||||
if (c) {
|
||||
return c.getBoolean(key, fallback);
|
||||
@@ -21,7 +21,7 @@ export class Config {
|
||||
return false;
|
||||
}
|
||||
|
||||
getNumber(key: string, fallback?: number): number {
|
||||
getNumber(key: keyof IonicConfig, fallback?: number): number {
|
||||
const c = getConfig();
|
||||
if (c) {
|
||||
return c.getNumber(key, fallback);
|
||||
@@ -29,7 +29,7 @@ export class Config {
|
||||
return 0;
|
||||
}
|
||||
|
||||
set(key: string, value?: any) {
|
||||
set(key: keyof IonicConfig, value?: any) {
|
||||
const c = getConfig();
|
||||
if (c) {
|
||||
c.set(key, value);
|
||||
|
||||
Reference in New Issue
Block a user