octicon-rss(16/)
You've already forked ionic-framework
mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 22:44:13 +08:00
fix(angular): setup config provider correctly
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
committed by
Manu MA
gitea-unlock(16/)
parent
ae1028d91e
commit
82fbe3191a
octicon-diff(16/tw-mr-1) 4 changed files with 2849 additions and 23 deletions
@@ -1,7 +1,6 @@
|
||||
import { Config as CoreConfig } from '@ionic/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class Config {
|
||||
|
||||
get(key: string, fallback?: any): any {
|
||||
@@ -21,6 +20,8 @@ export class Config {
|
||||
}
|
||||
}
|
||||
|
||||
export const ConfigToken = new InjectionToken<any>('USERCONFIG');
|
||||
|
||||
function getConfig(): CoreConfig {
|
||||
const Ionic = (window as any).Ionic;
|
||||
if (Ionic && Ionic.config) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
export { AngularDelegate } from './angular-delegate';
|
||||
export { ActionSheetController } from './action-sheet-controller';
|
||||
export { AlertController } from './alert-controller';
|
||||
@@ -12,4 +11,4 @@ export { PopoverController } from './popover-controller';
|
||||
export { ToastController } from './toast-controller';
|
||||
export { NavController } from './nav-controller';
|
||||
export { DomController } from './dom-controller';
|
||||
export { Config } from './config';
|
||||
export { Config, ConfigToken } from './config';
|
||||
|
||||
Reference in New Issue
Block a user