Skip to content

Commit 5f03719

Browse files
fix(rxjs): Fix missing RxJS operators in tree-shaked apps
Perform the deep RxJS imports in eah file in which the operators are used. Closes #46
1 parent 9e0f064 commit 5f03719

File tree

2 files changed

+17
-26
lines changed

2 files changed

+17
-26
lines changed

src/directives/uiSrefStatus.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
/** @ng2api @module directives */ /** */
2-
import {Directive, Output, EventEmitter, ContentChildren, QueryList, Inject} from "@angular/core";
3-
import {UISref} from "./uiSref";
4-
import {PathNode} from "ui-router-core";
5-
import {Transition} from "ui-router-core";
6-
import {TargetState} from "ui-router-core";
7-
import {State} from "ui-router-core";
8-
import {anyTrueR, tail, unnestR, Predicate} from "ui-router-core";
9-
import {UIRouterGlobals} from "ui-router-core";
10-
import {Param} from "ui-router-core";
11-
import {PathFactory} from "ui-router-core";
12-
import {Subscription} from "rxjs/Subscription";
13-
import {Observable} from "rxjs/Observable";
14-
import {BehaviorSubject} from "rxjs/BehaviorSubject";
1+
/** @ng2api @module directives */
2+
/** */
3+
import { Directive, Output, EventEmitter, ContentChildren, QueryList } from '@angular/core';
4+
import { UISref } from './uiSref';
5+
import {
6+
PathNode, Transition, TargetState, State, anyTrueR, tail, unnestR, Predicate, UIRouterGlobals, Param, PathFactory
7+
} from 'ui-router-core';
8+
9+
import { Subscription } from 'rxjs/Subscription';
10+
import { Observable } from 'rxjs/Observable';
11+
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
12+
13+
import 'rxjs/add/observable/of';
14+
import 'rxjs/add/observable/fromPromise';
15+
import 'rxjs/add/observable/combineLatest';
16+
import 'rxjs/add/operator/concat';
17+
import 'rxjs/add/operator/switchMap';
1518

1619
/** @internalapi */
1720
interface TransEvt { evt: string, trans: Transition }

src/index.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
/** @ng2api @module ng2 */ /** for typedoc */
2-
import "rxjs/Observable";
3-
import "rxjs/ReplaySubject";
4-
import "rxjs/BehaviorSubject";
5-
import "rxjs/Subscription";
6-
import 'rxjs/add/observable/of';
7-
import 'rxjs/add/observable/combineLatest';
8-
import 'rxjs/add/observable/fromPromise';
9-
import 'rxjs/add/operator/switchMap';
10-
import 'rxjs/add/operator/mergeMap';
11-
import 'rxjs/add/operator/concat';
12-
import 'rxjs/add/operator/map';
13-
142
export * from "ui-router-core";
153
export * from "./interface";
164
export * from "./providers";

0 commit comments

Comments
 (0)