You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
Hello, I am developing an app in Ionic with Angular where I can answer some questionnaires; whenever I answer one of them it must be closed until some time has passed.
For this purpose I have a main page called quest.page.tswhere a list of questionnaires appear on the HTML. Whenever I click on questionnaire XXX it takes me to XXX.component.ts where I fill it and send it. The data from all questionnaires is "collected" and managed on the quest.service.tswhere I finally call a data.service.tswhere HTML calls are made to update the database. This database also contains the status of each questionnaire (open/closed) so together with the data of the questionnaire I must update the DB status of each of them.
Hence, my postXXXForm() function, on XXX.component.ts, is:
However, when I look at the console (and see that the questionnaires are not disabled) I see that the quest.page.ts has run before quest.serice.ts sets up the new status on the DB.
I guess it is related with async codes, but I have tries everything with no results... may someone help me please?
Steps to Reproduce
If any further code or information is needed, please contact me!
Code Reproduction URL
I cannot provide URL as it is a huge project linked to several private DBs
Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Hello, I am developing an app in Ionic with Angular where I can answer some questionnaires; whenever I answer one of them it must be closed until some time has passed.
For this purpose I have a main page called
quest.page.ts
where a list of questionnaires appear on the HTML. Whenever I click on questionnaire XXX it takes me toXXX.component.ts
where I fill it and send it. The data from all questionnaires is "collected" and managed on thequest.service.ts
where I finally call adata.service.ts
where HTML calls are made to update the database. This database also contains the status of each questionnaire (open/closed) so together with the data of the questionnaire I must update the DB status of each of them.Hence, my postXXXForm() function, on
XXX.component.ts
, is:Then,
quest.page.ts
checks on the DB the status of each questionnaire in order to enable them with:Finally, the
quest.service.ts
sets a new status with:Expected Behavior
With this part I would expect to run as I explained before. However, the order is inverted somehow.
However, when I look at the console (and see that the questionnaires are not disabled) I see that the quest.page.ts has run before quest.serice.ts sets up the new status on the DB.
I guess it is related with async codes, but I have tries everything with no results... may someone help me please?
Steps to Reproduce
If any further code or information is needed, please contact me!
Code Reproduction URL
I cannot provide URL as it is a huge project linked to several private DBs
Ionic Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: