Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
2 votes
1 answer
94 views

I am using RxJS for subscriptions in Angular. I noticed that when I manually subscribe to an observable and store the Subscription, I can easily check if it was unsubscribed using .closed, especially ...
Shaiju T's user avatar
  • 6,653
1 vote
2 answers
87 views

I'm new to Angular and right now I'm using Angular 14 and I have a problem that happens to me often. For example, I have an array and I make a for loop to go through each of its indexes and I make a ...
Sergio Cea's user avatar
1 vote
4 answers
227 views

I am working on an angular v14 application and I am having trouble figuring out how to fix an issue with my component making duplicate api calls. I have a service that is shared between all components ...
mobes's user avatar
  • 35
2 votes
1 answer
67 views

I have several functions in an angular project which return a boolean observable. Some of these functions could simply return an immediate result, but could also contain nested observables that open ...
David Adams's user avatar
1 vote
1 answer
2k views

Are there any differences or advantages or proper way to do this? Let's say I have an observable, I may receive it from backend call, a service or through a GUI event like scrolling event. I have a ...
Sidharth Bajpai's user avatar
1 vote
1 answer
83 views

I have a page that navigates to itself with different parameter. This makes the NgOnInit don't be executed again. Sadly, in the NgOnInit I have an observable subscribed to deal with value changes in a ...
Mikaelangel's user avatar
1 vote
1 answer
2k views

In the previous *ngIf directives we were able to chain multiple async operations to not repeat the async pipe in the template but to reuse them later as one subscription, now I want to use the same ...
Freestyle09's user avatar
  • 5,578
1 vote
1 answer
46 views

I have created a store to load address detail in behavior subject @Injectable({ providedIn: 'root' }) export class AddressStore { private subjectAddress = new BehaviorSubject<Address[]>([...
Ashok's user avatar
  • 311
1 vote
2 answers
113 views

I have a form. The user enters inputs and then a http request is sent to the backend to get data. In the HTML template I have data$ | async In the component code I first have: data$: Observable<...
Mootmoot's user avatar
2 votes
0 answers
1k views

I'm encountering an issue with Angular 17 where the use of an observable in my template seems to cause an indefinite loading of the page without displaying any errors in the browser console. This ...
Topolinetta's user avatar
0 votes
1 answer
650 views

I have tried and I still trying to create a mechanism in Angular using rx that will display my loader, but only if the API call is longer than 1 second, if it is shorter I would not like to display it....
kwlSca's user avatar
  • 7
0 votes
2 answers
48 views

New to Angular and I'm trying to follow a tutorial. I'm pulling data into a shared service via an http call but from there I can't seem to get it into my component to be displayed in a table. I can ...
public_void_kee's user avatar
0 votes
2 answers
50 views

I'm using Angular 15 and @angular/fire ^7.5.0 for my project. I have a service that makes some calls to the Firestore database, but before i perform any action i need to recover some information from ...
Oxenarf's user avatar
  • 278
0 votes
1 answer
276 views

So, I have a blog, and I'm trying to setup a check, on the creation of a new text, to lock the form if the title already exists. I got a TextService export class TextService { private _url = "...
Tamsin-chan's user avatar
1 vote
1 answer
2k views

auth.service.ts import { Injectable } from '@angular/core'; import { User, UserManager } from 'oidc-client-ts'; import { SettingsService } from './settings.service'; import { Observable, from } from '...
Richard Barraclough's user avatar
2 votes
2 answers
4k views

I had an error this is an error So I am learning how to catch errors with the catchError function in angular htttp services I have a ts file that executes function handler errors import { Injectable } ...
Sup's user avatar
  • 21
0 votes
1 answer
152 views

I'm accessing this route fine: http://localhost:8100/questions/question?id=3 Now I'm in trouble on how to handle two subscribers at the same time. The first subscriber loads the questions array from ...
anderlaini's user avatar
  • 1,835
0 votes
2 answers
347 views

I'm trying to get the information received via JSON, but I can't access it. The data arrives, as shown in the image below: screenshot from Console When I tried to access any property from it, I ...
adriwn92's user avatar
0 votes
1 answer
533 views

I'm trying to create a RouterGuard in Angular that gets a response from the backend about the User's login status. The problem is that the HTTP request returns a Subscription with async concrete ...
João Renault's user avatar
0 votes
2 answers
549 views

I want to retun only a valure: in html <tr *ngFor="let valCorr of valueCall| async"> <th>{{valCorr }}</th> </tr> in ts valueCall:Observable<number[]&...
Picco's user avatar
  • 461
0 votes
1 answer
1k views

I get the difference between concatMap and switchMap when an observable returns more than one value. However when all observables just return a single value, is there any advantage to using one over ...
Jeffrey Bane's user avatar
0 votes
1 answer
1k views

I'm using Angular 11.0.2. I have a form group with 20 fields that are displayed in two tables. Some of this formControls are shared between two forms. ~9 of those formControls are text input fields ...
mariaILikeIt's user avatar
0 votes
1 answer
760 views

I've created a simple column filter component so I can filter on a value in a table. All is working as expected but I have some issues when using proper typing for the event emitter. The relevant code ...
Kees de Bruin's user avatar
1 vote
2 answers
747 views

I have a problem filling a Users autocomplete on first load. This is my UsersService: public users: User[] = []; constructor(private http: HttpClient) { this.http.get<User[]>(environment....
Iñigo's user avatar
  • 2,026
0 votes
1 answer
1k views

Im currently trying to show the data of an employee after he loggin to his account, i can get the data of the employee from the backend by his username and i can console logged it , but when i assign ...
Fouad_Aurag's user avatar
0 votes
1 answer
171 views

I am trying to convert myself from knockoutjs, but i am struggling with how dynamic data/observables work in angular 12. I want to be able to prepopulate an array with some data from a service, but ...
bizzehdee's user avatar
  • 21.2k
0 votes
0 answers
1k views

I'm 'studying' Angular from a course-book. The example in book is not done by observable, but I have made my example with Json-server and a json file. I would like to update the rating value of the ...
user2363969's user avatar
-2 votes
2 answers
804 views

in my Angular App I have an API service like so that contains two methods: addComment(id: string, comment: string): Observable<any> { return this.http.post(`api/${encodeURIComponent(id)}/...
NewToAngular's user avatar
  • 1,125
1 vote
1 answer
101 views

Hi I have this two streams with Ofertas and concursos ofertas$ = this.dataService.getOfertas(); concursos$ = this.dataService.getConcursos(); ofertasConOrganismos$ = forkJoin([ this.ofertas$, this....
kintela's user avatar
  • 1,343
1 vote
1 answer
4k views

I obtain my Ofertas here getOfertasByYear(year:number): Observable<Oferta[]> { return this.http.get<Oferta[]>(`${this.urlWebAPI}/ofertas/year/${year}`) .pipe( map(ofertas=> ...
kintela's user avatar
  • 1,343
1 vote
2 answers
788 views

I am working with angular and firebase. I have 170 products in firebase. when I call the firebase I get the Observable of the products which stored in products$. Problem: I would like to shuffle all ...
Faysal Ovi's user avatar
1 vote
3 answers
9k views

I'm getting ERROR RangeError: Maximum call stack size exceeded message in console when I type something in one of this inputs app.component.html <div class="container-wrap"> <...
Tobias Foxtrot's user avatar
0 votes
4 answers
954 views

Using Angular 12 The HTTP service returns the following response from the backend Array<{ id: string; title: string; created: string; }> // Service public list(): Observable<Array&...
Anuj TBE's user avatar
  • 9,922
0 votes
0 answers
137 views

In Angular 9, I'm getting data from subscribe() inner forEach. I can see that my variable is loaded with data, but Angular is not rendering. I suspect that Angular is rendering before my variable is ...
jbernardo's user avatar
  • 181
0 votes
1 answer
617 views

I have an currentUser$ in AccountService; private currentUserSource = new ReplaySubject<User>(1); currentUser$ = this.currentUserSource.asObservable(); In login method: this.currentUserSource....
Zaheer Ul Hassan's user avatar
1 vote
1 answer
69 views

I feel like I fundamentally misunderstand one part of Angular, imagine the following: You have a navbar component which shows the logged in user, something like: <nav *ngIf="user$ | async as ...
Niels van Rijn's user avatar
0 votes
2 answers
2k views

In the below code, I have a for loop inside that one API is getting called. I want the 1st API call to be finished and code inside subscribe fully executes first and then the next iteration of for ...
Surya's user avatar
  • 764
0 votes
1 answer
783 views

I'm currently doing an Angular app with CRUD operations and Springboot API as a back end. The problem is when I add a new user, it successfully added but it does not automatically display on the List. ...
taurus's user avatar
  • 3
1 vote
2 answers
1k views

In my angular 12 app Im trying to return some api data before any of my other components load (including the app component). I want to place some returned items in local storage that will be able to ...
will's user avatar
  • 11
0 votes
1 answer
567 views

I am trying to display a table by looping an array of objects fetched from backend API. <tr *ngFor="let obj of objarray"> <td>{{obj.property1}}</td> &...
user2021's user avatar
2 votes
1 answer
3k views

I have a navbar in my App component: app.component.html <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav me-auto mb-2 mb-lg-...
Jason's user avatar
  • 1,059
0 votes
1 answer
1k views

In my form there are some Checkboxes. Checkboxes are dynamically generated based on the values getting from API response. If the API response is not null and there is some value then I want to make ...
mnu-nasir's user avatar
  • 1,772
1 vote
1 answer
643 views

Suppose I have a service with a method that pings an url until a certain condition is met. After that it returns the result. The whole thing should be built with Observables (to be easily cancellable ...
Vee6's user avatar
  • 1,577
1 vote
2 answers
2k views

I am trying to create an authorized system for users.I am using Angular11.I am absolutely new in angular.I return also a boolean type in my code. but still, I found an error. here is my code below:- ...
user avatar
0 votes
1 answer
231 views

In my Angular component, I have this ngOnInit(): void { this.route.paramMap .pipe( tap(item=>console.log(item)) ) .subscribe( params => { const proyectoId = params.get('proyectoId'); ...
kintela's user avatar
  • 1,343
0 votes
3 answers
1k views

I have a component that displays a message for a few seconds, my problem is that I can not subscribe to the service and perform the necessary operations, how to do this? This was a short example, I ...
jon's user avatar
  • 1
0 votes
1 answer
994 views

want to optimize the following code: multiple subscription in multiple if else statements. consider:- getList(): void { this.subs.sink = this.subscription1.subscribe((user) => { if (user) ...
archit jain's user avatar
0 votes
1 answer
141 views

In my project I need to calculate some data in function of some dates (month and year) so once I have the dates in the array "this.etiquetasEjeX". I loop them to calculate the data in my ...
kintela's user avatar
  • 1,343
2 votes
2 answers
3k views

I write an angular 11 and I'm pretty new to Observables and Subjects. I have a mat-autocomplete component and it's results are divided to categories. the last category is an articles category and i ...
ufk's user avatar
  • 32.4k
0 votes
1 answer
674 views

Function to be tested changeIva(idTax: number, index: number): void { this.documentService.getTaxById(idTax).subscribe(tax => { if (tax.codigo === 'ISE') this.openModal(index); }); }...
Nixon Silva's user avatar

1
2 3 4 5 6