当前位置: 首页>>代码示例>>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;未经允许,请勿转载。