Skip to content

refactor(OpaqueToken): change deprecated import #11916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/app/app-root.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ComponentFactoryResolver, ElementRef, Inject, OnInit, OpaqueToken, Renderer, ViewChild, ViewContainerRef } from '@angular/core';
import { Component, ComponentFactoryResolver, ElementRef, Inject, OnInit, InjectionToken, Renderer, ViewChild, ViewContainerRef } from '@angular/core';

import { App } from './app';
import { assert } from '../../util/util';
Expand All @@ -8,7 +8,7 @@ import { OverlayPortal } from './overlay-portal';
import { Platform } from '../../platform/platform';
import * as Constants from './app-constants';

export const AppRootToken = new OpaqueToken('USERROOT');
export const AppRootToken = new InjectionToken<any>('USERROOT');

/**
* @hidden
Expand Down
4 changes: 2 additions & 2 deletions src/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OpaqueToken } from '@angular/core';
import { InjectionToken } from '@angular/core';

/**
* @ngdoc service
Expand Down Expand Up @@ -413,4 +413,4 @@ export function setupConfig(userConfig: any, plt: Platform): Config {
/**
* @hidden
*/
export const ConfigToken = new OpaqueToken('USERCONFIG');
export const ConfigToken = new InjectionToken<any>('USERCONFIG');
4 changes: 2 additions & 2 deletions src/navigation/url-serializer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OpaqueToken } from '@angular/core';
import { InjectionToken } from '@angular/core';

import { DeepLinkConfig, NavLink, NavSegment } from './nav-util';
import { isArray, isBlank, isPresent } from '../util/util';
Expand Down Expand Up @@ -320,7 +320,7 @@ const URL_REPLACE_REG = /\s+|\?|\!|\$|\,|\.|\+|\"|\'|\*|\^|\||\/|\\|\[|\]|#|%|`|
/**
* @hidden
*/
export const DeepLinkConfigToken = new OpaqueToken('USERLINKS');
export const DeepLinkConfigToken = new InjectionToken<any>('USERLINKS');

export function setupUrlSerializer(userDeepLinkConfig: any): UrlSerializer {
return new UrlSerializer(userDeepLinkConfig);
Expand Down
4 changes: 2 additions & 2 deletions src/platform/platform-registry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OpaqueToken } from '@angular/core';
import { InjectionToken } from '@angular/core';

import { Platform, PlatformConfig } from './platform';
import { isCordova, isElectron, isIos, isIosUIWebView } from './platform-utils';
Expand Down Expand Up @@ -241,7 +241,7 @@ export const PLATFORM_CONFIGS: { [key: string]: PlatformConfig } = {
};


export const PlatformConfigToken = new OpaqueToken('PLTCONFIG');
export const PlatformConfigToken = new InjectionToken<any>('PLTCONFIG');

export function providePlatformConfigs() {
return PLATFORM_CONFIGS;
Expand Down
4 changes: 2 additions & 2 deletions src/util/module-loader.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ComponentFactoryResolver, Injectable, Injector, NgModuleFactory, NgZone, OpaqueToken, Type } from '@angular/core';
import { ComponentFactoryResolver, Injectable, Injector, NgModuleFactory, NgZone, InjectionToken, Type } from '@angular/core';
import { Config } from '../config/config';
import { DeepLinkConfig } from '../navigation/nav-util';
import { NgModuleLoader } from './ng-module-loader';
import { requestIonicCallback } from './util';

export const LAZY_LOADED_TOKEN = new OpaqueToken('LZYCMP');
export const LAZY_LOADED_TOKEN = new InjectionToken<any>('LZYCMP');



Expand Down