當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Store.pipe方法代碼示例

本文整理匯總了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));
 }
開發者ID:our-city-app,項目名稱:plugin-mobicage-control-center,代碼行數:7,代碼來源:developer-accounts.component.ts

示例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 = [];
    }
開發者ID:karthik12ui,項目名稱:fuse-angular-full,代碼行數:37,代碼來源:mail.service.ts

示例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));
 }
開發者ID:huytq1,項目名稱:Angular-NgRx-GettingStarted,代碼行數:7,代碼來源:product-shell.component.ts

示例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));
 }
開發者ID:AlexChar,項目名稱:platform,代碼行數:8,代碼來源:app.component.ts

示例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)
   );
 }
開發者ID:AlexChar,項目名稱:platform,代碼行數:8,代碼來源:selected-book-page.component.ts

示例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));
 }
開發者ID:our-city-app,項目名稱:plugin-mobicage-control-center,代碼行數:8,代碼來源:review-notes.component.ts

示例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));
 }
開發者ID:our-city-app,項目名稱:plugin-mobicage-control-center,代碼行數:9,代碼來源:contacts.component.ts

示例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));
 }
開發者ID:sonicdelay,項目名稱:mtcms,代碼行數:9,代碼來源:find-book-page.component.ts

示例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());
     }
   });
 }
開發者ID:our-city-app,項目名稱:plugin-interactive-explorer,代碼行數:9,代碼來源:scripts-page.component.ts


注:本文中的@ngrx/store.Store.pipe方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。