本文整理匯總了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());
}
});
}