我有一个这样的 ngrx 商店:
export default compose(storeLogger(), combineReducers) ({
auth: authReducer,
users: userReducer
});
在服务中,我尝试执行以下操作:
import 'rxjs/add/operator/do';
@Injectable()
export class ApiService {
constructor(private _http: Http, private _store: Store<AppState>, private _updates$: StateUpdates<AppState>) {
_store.select<Auth>('auth').do(_ => {console.log("token:" +_.token)});
}
除了订阅,没有运营商工作。为什么?