Skip to content

Commit

Permalink
fix(#3087): deep rxjs imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad committed Nov 18, 2016
1 parent 9647049 commit 964c99f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
9 changes: 8 additions & 1 deletion src/ng2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
export * from "ui-router-core";
import "ui-router-core/lib/justjs";

import 'rxjs/add/observable/of';
import 'rxjs/add/observable/combineLatest';
import 'rxjs/add/observable/fromPromise';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/concat';
import 'rxjs/add/operator/map';

export * from "./ng2/interface";
export * from "./ng2/lazyLoadNgModule";
export * from "./ng2/rx";
Expand All @@ -11,4 +19,3 @@ export * from "./ng2/directives/directives";
export * from "./ng2/statebuilders/views";
export * from "./ng2/uiRouterNgModule";
export * from "./ng2/uiRouterConfig";

9 changes: 5 additions & 4 deletions src/ng2/directives/uiSref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {UIView, ParentUIViewInject} from "./uiView";
import {extend, Obj} from "ui-router-core";
import {TransitionOptions} from "ui-router-core";
import {Globals} from "ui-router-core";
import {Subscription, ReplaySubject} from "rxjs/Rx";
import {ReplaySubject} from 'rxjs/ReplaySubject';
import {Subscription} from 'rxjs/Subscription';
import {TargetState} from "ui-router-core";
import "../rx";

Expand All @@ -30,17 +31,17 @@ export class AnchorUISref {
* ### Purpose
*
* This directive is applied to anchor tags (`<a>`) or any other clickable element. It is a state reference (or sref --
* similar to an href). When clicked, the directive will transition to that state by calling [[StateService.go]],
* similar to an href). When clicked, the directive will transition to that state by calling [[StateService.go]],
* and optionally supply state parameter values and transition options.
*
* When this directive is on an anchor tag, it will also add an `href` attribute to the anchor.
*
* ### Selector
*
* - `[uiSref]`: The directive is created as an attribute on an element, e.g., `<a uiSref></a>`
*
*
* ### Inputs
*
*
* - `uiSref`: the target state's name, e.g., `uiSref="foostate"`. If a component template uses a relative `uiSref`,
* e.g., `uiSref=".child"`, the reference is relative to that component's state.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ng2/directives/uiSrefActive.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @module directives */ /** */
import {Directive, Input, ElementRef, Host, Renderer} from "@angular/core";
import {UISrefStatus, SrefStatus} from "./uiSrefStatus";
import {Subscription} from "rxjs/Rx";
import {Subscription} from "rxjs/Subscription";

/**
* A directive that adds a CSS class when its associated `uiSref` link is active.
Expand Down
6 changes: 4 additions & 2 deletions src/ng2/directives/uiSrefStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import {anyTrueR, tail, unnestR, Predicate} from "ui-router-core";
import {Globals, UIRouterGlobals} from "ui-router-core";
import {Param} from "ui-router-core";
import {PathFactory} from "ui-router-core";
import {Subscription, Observable, BehaviorSubject} from "rxjs/Rx";
import {Subscription} from "rxjs/Subscription";
import {Observable} from "rxjs/Observable";
import {BehaviorSubject} from "rxjs/BehaviorSubject";

/** @internalapi */
interface TransEvt { evt: string, trans: Transition }
Expand Down Expand Up @@ -75,7 +77,7 @@ function spreadToSubPaths(basePath: PathNode[], appendPath: PathNode[]): PathNod
/**
* Given a TransEvt (Transition event: started, success, error)
* and a UISref Target State, return a SrefStatus object
* which represents the current status of that Sref:
* which represents the current status of that Sref:
* active, activeEq (exact match), entering, exiting
*
* @internalapi
Expand Down
3 changes: 2 additions & 1 deletion src/ng2/rx.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @module ng2 */ /** */
import {Observable, ReplaySubject} from "rxjs/Rx";
import {Observable} from "rxjs/Observable";
import {ReplaySubject} from "rxjs/ReplaySubject";
import {Transition} from "ui-router-core";
import {UIRouter} from "ui-router-core";
import {StateDeclaration} from "ui-router-core";
Expand Down

0 comments on commit 964c99f

Please sign in to comment.