• Jobs
  • About Us
  • Jobs
    • Home
    • Jobs
    • Courses and challenges
  • Businesses
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

368
Views
MergeMap en Ngrx Efecto causa tipos de error

tengo la clase de efecto NgRX que creo que es casi la misma que en los documentos.

 import { Injectable } from '@angular/core'; import { Actions, createEffect, ofType } from '@ngrx/effects'; import { EMPTY } from 'rxjs'; import { map, mergeMap, catchError } from 'rxjs/operators'; import { SocialLearningFacadeService } from '../../facades/social-learning-facade.service'; import { loadCategories, retreivedCategories } from '../actions/categories'; @Injectable() export class CategoriesEffects { loadMovies$: any = createEffect((): any => this.actions$.pipe( ofType(loadCategories), mergeMap(() => this.socialLearningFacadeService.getSocialLearningCategories().pipe( map((categories) => retreivedCategories({ socialLearningCategories: categories }) ), catchError(() => EMPTY) ) ) ) ); constructor( private actions$: Actions, private socialLearningFacadeService: SocialLearningFacadeService ) {} }

mis acciones:

 import { createAction, props } from '@ngrx/store'; import type { SocialLearningCategory } from '../../../../core/models/socialLearningCategory'; export const loadCategories = createAction('load categories'); export const retreivedCategories = createAction( 'retreived social learning categories', props<{ socialLearningCategories: any }>() );

y hay este error en MergeMap:

ingrese la descripción de la imagen aquí

No tengo ni idea de cómo interpretar este error, especialmente porque mi ejemplo es muy similar al de docs y todavía no funciona.

EDITAR: servicio de fachada de aprendizaje social

 import { Observable } from 'rxjs'; import { Injectable } from '@angular/core'; import { SocialLearningService } from '../services/social-learning.service'; import type { SocialLearningCategory } from '../../../core/models/socialLearningCategory'; import type { SocialLearningCategoryDetails } from '../../../core/models/socialLearningCategoryDetails'; @Injectable({ providedIn: 'root', }) export class SocialLearningFacadeService { constructor(private socialLearningService: SocialLearningService) {} public getSocialLearningCategories(): Observable<SocialLearningCategory[]> { return this.socialLearningService.getSocialLearningCategories(); } public getSocialLearningCategoryDetails( id: number ): Observable<SocialLearningCategoryDetails> { return this.socialLearningService.getSocialLearningCategoryDetails(id); } }
over 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.

Andres GPT

Show me some job opportunities
There's an error!