本文整理汇总了TypeScript中@ngrx/store.Store.pipe方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Store.pipe方法的具体用法?TypeScript Store.pipe怎么用?TypeScript Store.pipe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ngrx/store.Store
的用法示例。
在下文中一共展示了Store.pipe方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: ngOnInit
ngOnInit() {
this.developerAccounts$ = this.store.pipe(select(getDeveloperAccounts));
this.status$ = this.store.pipe(select(getDeveloperAccountsStatus));
this.store.dispatch(new GetDeveloperAccountsAction());
this.sub = this.store.pipe(select(getRemoveDeveloperAccountStatus), filter(s => s.error !== null))
.subscribe((status: ApiRequestStatus) => this.errorService.showErrorDialog(status.error));
}
示例2: ngOnInit
ngOnInit() {
this.paymentProvider = {
id: '',
name: '',
logo: null,
description: '',
black_white_logo: null,
background_color: '#00a263',
text_color: '#f4f4f4',
button_color: 'dark',
version: 1,
oauth_settings: {
client_id: '',
secret: '',
base_url: '',
token_path: '',
authorize_path: '',
scope: '',
},
currencies: [],
asset_types: [],
settings: {},
app_ids: [],
embedded_application: null,
};
this.store.dispatch(new GetBackendRogerthatAppsAction());
this.status$ = this.store.pipe(select(getBackendPaymentProviderEditStatus));
this.rogerthatApps$ = this.store.pipe(select(getBackendRogerthatApps));
this.sub = this.actions$.pipe(ofType(BackendsActionTypes.CREATE_PAYMENT_PROVIDER_COMPLETE)).subscribe(() => {
this.router.navigate([ '..' ], { relativeTo: this.route });
});
this.store.dispatch(new ListEmbeddedAppsAction(EmbeddedAppTag.PAYMENTS));
this.embeddedApplications$ = this.store.pipe(select(getEmbeddedApps));
}
开发者ID:our-city-app,项目名称:plugin-mobicage-control-center,代码行数:34,代码来源:create-payment-provider.component.ts
示例3: constructor
/**
* Constructor
*
* @param {HttpClient} _httpClient
* @param {Store<MailAppState>} _store
*/
constructor(
private _httpClient: HttpClient,
private _store: Store<MailAppState>
)
{
this._store
.pipe(select(getFoldersArr))
.subscribe(folders => {
this.foldersArr = folders;
});
this._store
.pipe(select(getFiltersArr))
.subscribe(filters => {
this.filtersArr = filters;
});
this._store
.pipe(select(getLabelsArr))
.subscribe(labels => {
this.labelsArr = labels;
});
this._store
.pipe(select(getMailsArr))
.subscribe(mails => {
this.mails = mails;
});
this.selectedMails = [];
}
示例4: ngOnInit
ngOnInit(): void {
this.store.dispatch(new productActions.Load());
this.products$ = this.store.pipe(select(fromProduct.getProducts));
this.errorMessage$ = this.store.pipe(select(fromProduct.getError));
this.selectedProduct$ = this.store.pipe(select(fromProduct.getCurrentProduct));
this.displayCode$ = this.store.pipe(select(fromProduct.getShowProductCode));
}
示例5: constructor
constructor(private store: Store<fromRoot.State>) {
/**
* Selectors can be applied with the `select` operator which passes the state
* tree to the provided selector
*/
this.showSidenav$ = this.store.pipe(select(fromRoot.getShowSidenav));
this.loggedIn$ = this.store.pipe(select(fromAuth.getLoggedIn));
}
示例6: constructor
constructor(private store: Store<fromBooks.State>) {
this.book$ = store.pipe(select(fromBooks.getSelectedBook)) as Observable<
Book
>;
this.isSelectedBookInCollection$ = store.pipe(
select(fromBooks.isSelectedBookInCollection)
);
}
示例7: ngOnInit
ngOnInit() {
this.store.dispatch(new GetReviewNotesListAction());
this.store.dispatch(new ClearReviewNotesAction());
this.reviewNotes$ = this.store.pipe(select(getReviewNotesList));
this.status$ = this.store.pipe(select(getReviewNotesListStatus));
this._removeSubscription = this.store.pipe(select(getRemoveReviewNotesStatus), filter(s => s.error !== null))
.subscribe((status: ApiRequestStatus) => this.errorService.showErrorDialog(status.error));
}
示例8: ngOnInit
ngOnInit() {
this.store.dispatch(new GetContactsAction());
this.contacts$ = this.store.pipe(select(getContacts));
this.status$ = this.store.pipe(select(getContactsStatus));
this._removeContactSubscription = this.store.pipe(
select(getRemoveContactStatus),
filter(s => s.error !== null))
.subscribe(status => this.errorService.showErrorDialog(status.error));
}
示例9: constructor
constructor(private store: Store<fromBooks.State>) {
this.searchQuery$ = store.pipe(
select(fromBooks.getSearchQuery),
take(1)
);
this.books$ = store.pipe(select(fromBooks.getSearchResults));
this.loading$ = store.pipe(select(fromBooks.getSearchLoading));
this.error$ = store.pipe(select(fromBooks.getSearchError));
}
示例10: ngOnInit
ngOnInit() {
this.scripts$ = this.store.pipe(select(getScripts));
this.status$ = this.store.pipe(select(getScriptsStatus));
this.scripts$.pipe(first()).subscribe(s => {
if (!s.length) {
this.store.dispatch(new GetScriptsAction());
}
});
}