Skip to content

Commit bfa604c

Browse files
fix(NgModule): Use InjectionToken instead of OpaqueToken
Closes #155
1 parent 83f7011 commit bfa604c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/uiRouterNgModule.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/** */
33
import { Ng2StateDeclaration } from "./interface";
44
import {
5-
NgModule, OpaqueToken, ModuleWithProviders, ANALYZE_FOR_ENTRY_COMPONENTS, Provider, Injector
5+
NgModule, ModuleWithProviders, ANALYZE_FOR_ENTRY_COMPONENTS, Provider, Injector, InjectionToken
66
} from "@angular/core";
77
import { CommonModule, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from "@angular/common";
88
import { _UIROUTER_DIRECTIVES } from "./directives/directives";
@@ -11,9 +11,9 @@ import { UrlRuleHandlerFn, TargetState, TargetStateDef, UIRouter } from "@uirout
1111
import { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from "./providers";
1212

1313
import { ROUTES } from "@angular/router";
14-
/** @hidden */ export const UIROUTER_ROOT_MODULE = new OpaqueToken("UIRouter Root Module");
15-
/** @hidden */ export const UIROUTER_MODULE_TOKEN = new OpaqueToken("UIRouter Module");
16-
/** @hidden */ export const UIROUTER_STATES = new OpaqueToken("UIRouter States");
14+
/** @hidden */ export const UIROUTER_ROOT_MODULE = new InjectionToken("UIRouter Root Module");
15+
/** @hidden */ export const UIROUTER_MODULE_TOKEN = new InjectionToken("UIRouter Module");
16+
/** @hidden */ export const UIROUTER_STATES = new InjectionToken("UIRouter States");
1717
// /** @hidden */ export const ROUTES = UIROUTER_STATES;
1818

1919
export function makeRootProviders(module: StatesModule): Provider[] {

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
version "5.0.6"
9696
resolved "https://registry.yarnpkg.com/@uirouter/core/-/core-5.0.6.tgz#251e1fc4d6ce8fe47e374bb86971e68a2ef1b323"
9797

98-
"@uirouter/publish-scripts@^1.0.4":
98+
"@uirouter/publish-scripts@^1.0.7":
9999
version "1.0.7"
100100
resolved "https://registry.yarnpkg.com/@uirouter/publish-scripts/-/publish-scripts-1.0.7.tgz#99ffd6aeced41e96b92ccb007342eee5d14b0a9a"
101101
dependencies:

0 commit comments

Comments
 (0)