fix(di): update dependency injection and default configs

This commit is contained in:
Adam Bradley
2016-09-16 00:49:09 -05:00
parent 1d403b26ed
commit 7c05d0c0ba
34 changed files with 1396 additions and 1534 deletions

View File

@ -2,12 +2,11 @@ import { Component, ComponentFactoryResolver, ElementRef, Inject, OnInit, Opaque
import { App } from './app';
import { Config } from '../../config/config';
import { FeatureDetect } from '../../util/feature-detect';
import { Ion } from '../ion';
import { OverlayPortal } from '../nav/overlay-portal';
import { Platform } from '../../platform/platform';
export const UserRoot = new OpaqueToken('USERROOT');
export const AppRootToken = new OpaqueToken('USERROOT');
/**
* @private
@ -32,13 +31,12 @@ export class IonicApp extends Ion implements OnInit {
@ViewChild('toastPortal', { read: OverlayPortal }) _toastPortal: OverlayPortal;
constructor(
@Inject(UserRoot) private _userCmp: any,
@Inject(AppRootToken) private _userCmp: any,
private _cfr: ComponentFactoryResolver,
elementRef: ElementRef,
renderer: Renderer,
config: Config,
private _platform: Platform,
private _featureDetect: FeatureDetect,
app: App
) {
super(config, elementRef, renderer);
@ -80,8 +78,6 @@ export class IonicApp extends Ion implements OnInit {
if (this._config.getBoolean('hoverCSS', true)) {
this.setElementClass('enable-hover', true);
}
this._featureDetect.test(this);
}
/**