Team15-kfupm / myRewards-Angular

The portal for the BO
0 stars 0 forks source link

How to manage state in the Angular #10

Closed alikhleel closed 1 year ago

alikhleel commented 1 year ago

We need an abstract class that store modules state.

For example, when we want to add loading bar in the login page, or when we get offers in the offer page. Is there a way to store and manage state of the the modules?

Ali-jdk commented 1 year ago

Do you mean a spinner for async functions ?

if so, certainly there are many ways

alikhleel commented 1 year ago

as you said there may be many other ways to do it. However, is there a more generalized way to do it across the application, like block in flutter.

For now, I don't see its benefits. But I just asked in case you had some experience with it.

Ali-jdk commented 1 year ago

Yes I had it was not really general but it worked

Ali-jdk commented 1 year ago

https://user-images.githubusercontent.com/61953059/217387583-d785b2c8-95ed-4762-9a19-35d74acdfd31.mov

something like this ?

alikhleel commented 1 year ago

Yes, I think this is what we need for now. However, there are some other states that needs to be managed across the whole application, but let's keep it simple for now.