Skip to content

Commit b4d1f49

Browse files
chore(StateObject): Switch from State to StateObject
1 parent 7b70b4a commit b4d1f49

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/directives/uiSrefStatus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Directive, Output, EventEmitter, ContentChildren, QueryList } from '@angular/core';
44
import { UISref } from './uiSref';
55
import {
6-
PathNode, Transition, TargetState, State, anyTrueR, tail, unnestR, Predicate, UIRouterGlobals, Param, PathFactory
6+
PathNode, Transition, TargetState, StateObject, anyTrueR, tail, unnestR, Predicate, UIRouterGlobals, Param, PathFactory
77
} from 'ui-router-core';
88

99
import { Subscription } from 'rxjs/Subscription';
@@ -53,7 +53,7 @@ const inactiveStatus: SrefStatus = {
5353
*/
5454
const pathMatches = (target: TargetState): Predicate<PathNode[]> => {
5555
if (!target.exists()) return () => false;
56-
let state: State = target.$state();
56+
let state: StateObject = target.$state();
5757
let targetParamVals = target.params();
5858
let targetPath: PathNode[] = PathFactory.buildPath(target);
5959
let paramSchema: Param[] = targetPath.map(node => node.paramSchema)

src/statebuilders/lazyLoad.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @module ng2 */
22
/** */
33
import { LazyLoadResult, Transition, StateDeclaration } from "ui-router-core"; // has or is using
4-
import { BuilderFunction, State } from "ui-router-core";
4+
import { BuilderFunction, StateObject } from "ui-router-core";
55
import { loadNgModule } from "../lazyLoad/lazyLoadNgModule";
66

77
/**
@@ -47,7 +47,7 @@ import { loadNgModule } from "../lazyLoad/lazyLoadNgModule";
4747
* ```
4848
*
4949
*/
50-
export function ng2LazyLoadBuilder(state: State, parent: BuilderFunction) {
50+
export function ng2LazyLoadBuilder(state: StateObject, parent: BuilderFunction) {
5151
let loadNgModuleFn = state['loadChildren'];
5252
return loadNgModuleFn ? loadNgModule(loadNgModuleFn) : state.lazyLoad;
5353
}

src/statebuilders/views.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @module ng2 */ /** */
2-
import {State} from "ui-router-core";
2+
import { State, StateObject } from "ui-router-core";
33
import {PathNode} from "ui-router-core";
44
import {pick, forEach} from "ui-router-core";
55
import {ViewConfig} from "ui-router-core";
@@ -16,7 +16,7 @@ import {ViewService} from "ui-router-core";
1616
* If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object and
1717
* applies the state-level configuration to a view named `$default`.
1818
*/
19-
export function ng2ViewsBuilder(state: State) {
19+
export function ng2ViewsBuilder(state: StateObject) {
2020
let views: { [key: string]: Ng2ViewDeclaration } = {},
2121
viewsObject = state.views || {"$default": pick(state, ["component", "bindings"])};
2222

0 commit comments

Comments
 (0)