1,004
questions
1
vote
1
answer
38
views
Is the method subscribe in angular 17 is not working
export class HomeComponent implements OnInit {
data: any;
constructor(private apiService: ApiService) { }
ngOnInit(): void {
// Substitua 'your-endpoint' pelo seu endpoint real
this....
3
votes
2
answers
46
views
2 observables declared with takeUntilDestroyed, when combined, require additional takeUntilDestroyed?
I'm using takeUntilDestroyed to manage my subscriptions and avoid memory leaks. Within an injection context, variable declaration, I will have something like this
mySubject1$ = new BehaviourSubject<...
0
votes
0
answers
16
views
linking the data of subscribers to a gym on the WordPress website
What is the method for linking the data of subscribers to a gym on the WordPress website, where subscribers can log into their account and view the details of their subscription to this gym through ...
0
votes
0
answers
13
views
How to set and get custom information from Smart Subscribe Paypal response?
I was using a simple subscription button in paypal for my clients. But Now, I want to use the Smart subscribe button. I figured out the code and subscriptions. But I am worrying about adding client's ...
1
vote
2
answers
45
views
can't iterate over array created in service - async issue?
I create an array of Items like this in my service:
items: IItem[] = [];
...
LoadItems() {
this.GetItems().subscribe((res) => {
// console.log(res);
if (res.status ==...
0
votes
1
answer
18
views
Svelte subscribe to changes using github.com/joshnuss/svelte-local-storage-store
I am quite new to Svelte coming from an IOS background. I am currently trying to build a fairly simple application and am going around in circles trying to get my values to auto update when they are ...
0
votes
0
answers
42
views
Subscribe to receive notifications from Redis cluster using StackExchange.Redis
I'm trying to write a straightforward .Net app that will subscribe to a cluster of Redis nodes, to receive change notifications.
The cluster configuration is the following:
➜ redis-cli -h 10.0.255.86
...
1
vote
2
answers
71
views
Async pipe not updating view although subscribing and using the latest value of the attribute works in Angular
Consider the below snapshot that does't work:
Parent.ts
allowed$ : Observable<boolean>;
Parent.html
<child [allowed]="allowed$ | async">
Child.ts
@Input() allowed : boolean
...
0
votes
1
answer
454
views
Run method when variable changes in lwc
I simply want to run a method when a variable changes. I think @track monitors the changes, but how do I run this method when it does? How do I write this?
@track displayedData <---when this ...
0
votes
0
answers
64
views
Convert aura:handler to lightning web component
How do I convert this aura attribute and event handler to LWC? I assume when the attribute/property changes, the method runs. but I don't know how to write it in lwc and the docs arent super helpful. ...
0
votes
1
answer
211
views
MQTT multiple subscribers to one topic
I've recently started using the MQTT broker in AWS, where one device receives messages to control a wind turbine. Now, I wanted to expand this control by connecting a second device to the broker topic....
0
votes
1
answer
39
views
How does this props passing method which includes a subscriber in the onMount directive work?
I'm trying to use Monaco Editor in Svelte. I found this snippet online and it has an interesting way of defining the component. It looks like it declares this content object in the onMount phase which ...
0
votes
3
answers
52
views
Angular RxJs encapsulate subscription in called function
When we learn about subscribing to Observables a common example goes uses http requests:
given a service method to retrieve data over http, a component calls this method, the method returns an ...
2
votes
1
answer
57
views
Zero removed after decimal point while Observable emitted the next value Angular
Here, In this example An observable is emitting values. But in console output, zeros after decimals are removed automatically.
I want to keep these zeros as it as after decimal. Is there a way to keep ...
0
votes
0
answers
52
views
Angular material snackbar is not working, don't have any error in cli
addtoCart(product: Product): void {
// console.log("Product Added to cart ", product)
this.cartservice.addToCart(product).subscribe({
next: () =\> {
console.log("Product Added ...
0
votes
1
answer
51
views
Can I use the callback in the publish function to receive a result from the subscriber?
I've written an AWS lambda function that uses IoT to publish messages that are subscribed to by remote devices. Each device only subscribes to messages containing its specific id. This is working well ...
0
votes
0
answers
95
views
How handle rxdb .$.subscribe with replication
i my case,
i m using myDatabase.collections.opportunities.$.subscribe(
that must save any historical step/changes for each. where there differences between documentData and previousDocumentData on &...
2
votes
2
answers
138
views
Wait for user input in Angular function
I have a function in Angular where I need to wait for a response from the user, but I am not having any success. I THINK I should be using "subscribe()" but don't fully understand how and ...
1
vote
0
answers
68
views
python django asyncua subscription synchronous
In the following example, I call my function check_data_acknowledge from a synchronous function to subscribe to a node, determine the moment of its modification, and act accordingly.
I just found a ...
0
votes
0
answers
192
views
Does HashPack wallet support a subscription model?
I am building an NFT platform and planning to use a subscription approach for users who want to access the platform. Instead of keeping the traditional payment gateway (stip / paypal) I would like to ...
0
votes
0
answers
52
views
UI loading before set value of a variable in subsribe in angular
`isReqReviewSelected: boolean = false;`
ngOnInit() { this.getIntProgReviewCommentsById(this.selectedAgendaId); console.log(Reviewe:'+this.isReqReviewSelected); //Always false - Ui render before ...
1
vote
0
answers
31
views
Angular subscribe issues
I am converting subscribes to not be deprecated and use the next:, error:, and complete.
Testing I am not able to populate the options, input etc to complete the form and submit. "Subscribe ...
0
votes
0
answers
53
views
The component didn't catch the updated error message from the service
export class Component implements OnInit {
error$: Observable<string>;
constructor(
private errorService: ErrorHandlerService
) {
this.errorService.errorPublic.subscribe((...
-1
votes
2
answers
138
views
strike on subscribe while coding in angular. Its says depreciated on hover [duplicate]
I am still figuring out angular. I am working a form to post user details. The form is working and i can see the values in database. Problem is i see a strike on subscribe and on hover it shows the ...
-1
votes
1
answer
371
views
Medusa JS Service is not recognized On subscriber
Medusa's custom service is not referenced in the subscriber
Describe the bug
I Have a service custom for example I referred on pre-existing example onboardingService
when I run medusa develop i am ...
0
votes
2
answers
35
views
Why is my component not updating with the data being returned by an Observable?
This is the .ts file for my component:
_myMovieRating: number = 0;
get myMovieRating(): number {
return Number(this._myMovieRating);
}
set myMovieRating(value: number) {
this....
0
votes
1
answer
187
views
How do you make an async request inside a CanDeactivateFn guard in Angular?
Maybe a weird question but I've been having issues solving issues with this for a bit.
I have this function, which is really just an custom Alert Window that might or might not get called if a user ...
1
vote
1
answer
45
views
Seeking Guidance on Handling Deprecated 'Subscribe' in Angular
Screenshot of htmlThis is my userUpdate() code Where i am facing subscribe getting deprecated. I am using PUT function and i will copy paste the code below.
`userUpdate() {
if (this.userForm.valid) {...
-1
votes
1
answer
37
views
How to get my token and user from the backend to the front-end
This is my userservice.ts file code
export class UserService {
BASE_URL = "http://localhost:8082";
constructor(private httpClient:HttpClient) {}
public login(loginData:any){
...
0
votes
0
answers
97
views
Trigger a component function on svelte store method
I have a svelte store with a method called 'right'. When right is triggered I want the function handleNextImage in my component file to run. I am unsure how to do this properly, thanks!
import { ...
0
votes
0
answers
44
views
Data from observable API call with subscription not displaying until clicked upon, error message not making sense
I'm currently in the process of upgrading an application from Angular 7 to Angular 16, and while that has presented several problems relating to features being deprecated, this one seems to be failing....
-1
votes
1
answer
41
views
New apple subscription items are not displaying in my unity application
I'm managing my app's subscription products through Firebase. While I can display my existing products in the app, I'm facing an issue where newly created products are not showing up. I've ...
1
vote
2
answers
221
views
How do I replace subscrib in a subscribe in Angular RxJS?
I have a question about RxJS.
I am creating a web app to manage the members of an association.
I want to create a button to "reset" the database of a site.
The steps are as follows:
send an ...
0
votes
1
answer
35
views
Angular: How to make a suscribe inside a for loop to wait until its finished
good day.
I'm having a problem on how to get this work correctly, the problem is that i have a subscribe function that needs to resolve inside a For Loop like this:
if (item.paquete == 1) {
...
0
votes
1
answer
432
views
MQTT Subscribe fail in simcom module A7672SA
I'm using the A7672SA module in a device, and the communication will be via MQTTS. I'm facing an issue with the subscribe functionality. I need to subscribe to 22 topics, but I can only manage to ...
0
votes
2
answers
2k
views
Subscribe showing deprecated Angular
I am trying to code a movie app and I am getting this message:
"'(next?: ((value: any) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => ...
0
votes
1
answer
110
views
Combine multiple Observable subscription results in Angular with forkJoin
(1) I have a request in Firebase firestore where I get several 'nomBu' strings from a collection. OK
(2) Then, with these recovered 'nomBu' strings, I make a second request to get metedata from ...
0
votes
2
answers
55
views
Combine multiple Observable subscription results in Angular
(1) I have a request in Firebase firestore where I get several 'nomBu' strings from a collection. OK
(2) Then, with these recovered 'nomBu' strings, I make a second request to get metedata from ...
0
votes
3
answers
65
views
Variable assigned inside subscribe is empty outside subscribe?
Variable assigned inside subscribe is empty outside subscribe? why? I know that susbcribe is asynchronous, but, I don't know how await to render this var... please somebody help me and explain to me. ...
0
votes
2
answers
72
views
Combine Observable subscription results in Angular
(1) I have a request in Firebase firestore where I get several 'nomBu' strings from a collection. OK
(2) Then, with these recovered 'nomBu' strings, I make a second request to get metedata from ...
0
votes
1
answer
58
views
Not getting data from one component to another
I am collecting data from a dialog component and on the closing of which I am redirecting the user to the /payments component and passing that particular data to this component. I am using a service ...
0
votes
2
answers
311
views
Error: NG0900: Error trying to diff '[object Object]'. Only arrays and iterables are allowed, using observable and subcribe
So I am trying to get data from the api and send it to a component to use in a table but I keep running into the same problem. I can see that the data is there but there is some problem. This is a ...
2
votes
0
answers
482
views
Supabase subscribe, single row, two columns
I'm trying to subscribe to a particular table row via the supabasejs library. It works for a single row like so:
supabase
.channel('any')
.on('postgres_changes', { event: '*', schema: '*', ...
0
votes
1
answer
541
views
Angular14: variable assigned inside subscribe is empty outside subscribe.. why? And what have i missed?
I have a variable that i have instantiated in the top of my typescript class like this:
UserTimeRegistration: TimeRegistration[];
I have a method calling an api like this:
getUserInfo(UserID: string):...
1
vote
0
answers
464
views
Where should Angular's [FormControl].valueChanges.subscribe() be located, ngOnInit() or constructor()?
I couldn't find a page in the Angular official documentation that explains where the best place for [FormControl].valueChanges.subscribe() is in ngOnInit() or constructor() .
If you know the ...
0
votes
1
answer
29
views
Not receiving subscribed subject
I want to use a service to subscribe a subject with a boolean as a value.
My Header.component listens to a scroll event an sets the subjects value depending on if the title is out of view or not.
My ...
0
votes
1
answer
51
views
Unable to pass data with service in Angular
I am new to at Angular and having problem with passing data with Services. I have two components named Input and Appointments. I stored my "appointmentList" array in a DataSource file like ...
0
votes
1
answer
1k
views
TypeError: .subscribe is not a function Jasmine Angular
I am trying to write unit test for my angular component.
I am able to mock 2 methods successfully using spyon.
But one method (_paymentStateService.getMakePaymentState$) is giving an error even after ...
0
votes
1
answer
864
views
Subscribe to an observable from HttpClient's GET method
I'm learning Angular and the course is outdated. I'm writing a very simple app which shows a list of people created from Persona class which receives the parameters nombre and apellido.
The code is ...
1
vote
1
answer
115
views
Angular Observable returns undefined after subscribing to it
I work with an Nx monorepo using Angular 15 and TypeScript.
I'm trying to do a simple fetch from a public api (url = https://jsonplaceholder.typicode.com/users/2) in my service and then log it in my ...