Questions tagged [subscribe]

This tag does not have any provided instructions for its usage at the moment.

java code for clicking all buttons with identical class

I have been attempting to select and click all buttons that share the same class. For instance: I am trying to select and click all buttons across the page with a specific class. I'm unsure if this is possible with the emulator or if there is a way to ac ...

Angular's HTTP client allows developers to easily make requests to

I am struggling with grasping the concept of async angular http client. In my Java backend, I have endpoints that return data in the same format but with different meanings. To handle this, I created the following code: export class AppComponent implement ...

What causes the HTML to not evaluate the values when the pipe is used?

I am currently utilizing a pipe for currency conversion, ensuring that the HTML values remain unevaluated. Let's take a look at the following pipe: transform(value: number, selectedCurrency: string, baseCurrency: string): number { if (selectedCurrenc ...

Exploring Angular 2's Observable Patterns and Subscribing Techniques

Despite perusing various posts and documentation on the topic, I am still unable to grasp the concept of observables and subscribing to them. My struggle lies in updating an array in one component and displaying it in another component that is not direct ...

The Angular subscribe value is consistently assigned as -1, just before it receives the actual assigned value

Upon completion of the .subscribe, I am attempting to trigger an event as the subsequent code relies on the result. checkIfBordereauExists(id: string) { return this._BourdereauService.get_one(id).subscribe( data = > { if (data.i ...

In Angular, there is an issue where the @ViewChild decorator does not reflect changes when the value of the child component is updated within the

Does anyone know why the console.log("My status :", status); is not displaying after the child property has changed? Here is my child component code: @Output() public isLoggedIn: Subject<boolean> = new Subject(); constructor( private auth ...

The error message TS2339 in Angular service.component indicates that the property 'subscribe' is not recognized on the type 'Promise<Object>'

Currently, I am in the process of learning Angular by developing a web application for my parish. I have implemented a method for deleting items in the products-list.component.ts file which appears to be technically correct. However, when I attempt to run ...

How can we avoid printing out undefined data from an Observable in Angular 2?

Here is the code I have in my service: fetchUserData(userId: string): Observable<any> { return this.http.get('https://jsonplaceholder.typicode.com/todos/' + userId) .map((response: Response) => { const userData = response. ...

To subscribe to the display of [Object Object], you cannot use an *ngIf statement without being inside an *ngFor loop

In my angular Quiz project, I have a functionality where every user can create quizzes. I want to display all the quizzes that a logged-in user has completed. Here is how I attempted to achieve this: // Retrieving user ID and category ID inside Re ...

The issue with the Angular 5 HttpClient GET-Request not closing persists

Currently, I am utilizing an Http-GET request to fetch JSON data from my backend service. Service: public storedCategories: BehaviorSubject<Category[]> = new BehaviorSubject(null); constructor() { const subscription = this.http.get&l ...