Skip to content

Commit f473d3a

Browse files
Merge pull request #5 from aitboudad/rxjs
fix(#3087): deep rxjs imports
2 parents 9647049 + 964c99f commit f473d3a

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

src/ng2.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
export * from "ui-router-core";
33
import "ui-router-core/lib/justjs";
44

5+
import 'rxjs/add/observable/of';
6+
import 'rxjs/add/observable/combineLatest';
7+
import 'rxjs/add/observable/fromPromise';
8+
import 'rxjs/add/operator/switchMap';
9+
import 'rxjs/add/operator/mergeMap';
10+
import 'rxjs/add/operator/concat';
11+
import 'rxjs/add/operator/map';
12+
513
export * from "./ng2/interface";
614
export * from "./ng2/lazyLoadNgModule";
715
export * from "./ng2/rx";
@@ -11,4 +19,3 @@ export * from "./ng2/directives/directives";
1119
export * from "./ng2/statebuilders/views";
1220
export * from "./ng2/uiRouterNgModule";
1321
export * from "./ng2/uiRouterConfig";
14-

src/ng2/directives/uiSref.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {UIView, ParentUIViewInject} from "./uiView";
88
import {extend, Obj} from "ui-router-core";
99
import {TransitionOptions} from "ui-router-core";
1010
import {Globals} from "ui-router-core";
11-
import {Subscription, ReplaySubject} from "rxjs/Rx";
11+
import {ReplaySubject} from 'rxjs/ReplaySubject';
12+
import {Subscription} from 'rxjs/Subscription';
1213
import {TargetState} from "ui-router-core";
1314
import "../rx";
1415

@@ -30,17 +31,17 @@ export class AnchorUISref {
3031
* ### Purpose
3132
*
3233
* This directive is applied to anchor tags (`<a>`) or any other clickable element. It is a state reference (or sref --
33-
* similar to an href). When clicked, the directive will transition to that state by calling [[StateService.go]],
34+
* similar to an href). When clicked, the directive will transition to that state by calling [[StateService.go]],
3435
* and optionally supply state parameter values and transition options.
3536
*
3637
* When this directive is on an anchor tag, it will also add an `href` attribute to the anchor.
3738
*
3839
* ### Selector
3940
*
4041
* - `[uiSref]`: The directive is created as an attribute on an element, e.g., `<a uiSref></a>`
41-
*
42+
*
4243
* ### Inputs
43-
*
44+
*
4445
* - `uiSref`: the target state's name, e.g., `uiSref="foostate"`. If a component template uses a relative `uiSref`,
4546
* e.g., `uiSref=".child"`, the reference is relative to that component's state.
4647
*

src/ng2/directives/uiSrefActive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @module directives */ /** */
22
import {Directive, Input, ElementRef, Host, Renderer} from "@angular/core";
33
import {UISrefStatus, SrefStatus} from "./uiSrefStatus";
4-
import {Subscription} from "rxjs/Rx";
4+
import {Subscription} from "rxjs/Subscription";
55

66
/**
77
* A directive that adds a CSS class when its associated `uiSref` link is active.

src/ng2/directives/uiSrefStatus.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import {anyTrueR, tail, unnestR, Predicate} from "ui-router-core";
99
import {Globals, UIRouterGlobals} from "ui-router-core";
1010
import {Param} from "ui-router-core";
1111
import {PathFactory} from "ui-router-core";
12-
import {Subscription, Observable, BehaviorSubject} from "rxjs/Rx";
12+
import {Subscription} from "rxjs/Subscription";
13+
import {Observable} from "rxjs/Observable";
14+
import {BehaviorSubject} from "rxjs/BehaviorSubject";
1315

1416
/** @internalapi */
1517
interface TransEvt { evt: string, trans: Transition }
@@ -75,7 +77,7 @@ function spreadToSubPaths(basePath: PathNode[], appendPath: PathNode[]): PathNod
7577
/**
7678
* Given a TransEvt (Transition event: started, success, error)
7779
* and a UISref Target State, return a SrefStatus object
78-
* which represents the current status of that Sref:
80+
* which represents the current status of that Sref:
7981
* active, activeEq (exact match), entering, exiting
8082
*
8183
* @internalapi

src/ng2/rx.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @module ng2 */ /** */
2-
import {Observable, ReplaySubject} from "rxjs/Rx";
2+
import {Observable} from "rxjs/Observable";
3+
import {ReplaySubject} from "rxjs/ReplaySubject";
34
import {Transition} from "ui-router-core";
45
import {UIRouter} from "ui-router-core";
56
import {StateDeclaration} from "ui-router-core";

0 commit comments

Comments
 (0)