Questions tagged [angular-state-managmement]
51 questions
1
vote
1 answer
Angular: mutating NGXS selector data is modifying state without an Action
I am using NGXS as my state management library. I have a users state and a selector to get list of users. I also have a component where I want to update user's name. The way I want to do this is to copy the users list that I get from the selector…

BiJ
- 1,639
- 5
- 24
- 55
1
vote
1 answer
@ngrx/data - Passing additional parameters or using custom functions in entity data service?
I am trying to use ngrx/data to handle CRUD operations on one of my models, but since it is "nested", I need to pass multiple parameters in the getById method. Is there a way to write custom functions in the data service (which extends the default…

b404
- 11
- 1
1
vote
1 answer
Angular 10 - Insert data using Redux
I am using redux to perform "CRUD" operations.
In my student.reduce.ts file, I have this code to generate a new register:
case StudentsActionTypes.CreateStudentSucceeded:
let studentNew = [];
let s = state.students;
…

Eladerezador
- 1,277
- 7
- 25
- 48
1
vote
1 answer
How to select part of a NGXS state?
I'm reading and trying the documentation of NGXS: https://www.ngxs.io/concepts/select
Except I'm doing this for my AuthState.
I've already implemented the AuthStateModel and the AuthState:
import { AngularFireAuth } from '@angular/fire/auth';
import…

J4N
- 19,480
- 39
- 187
- 340
1
vote
1 answer
Why do we need NgRX even we can do everything with services?
I've worked on some Angular 2+ projects and I'm still wondering why we do need NgRX.
I could implement everything with services and it seems that they are easier to understand.
I'm not sure if this is because I'm not familiar with NgRX, but anyway I…

Ever Dev
- 1,882
- 2
- 14
- 34
1
vote
1 answer
angular component not receiving state data if it's used second time
I am passing data from route with state but component is receiving it only first time, how I can listen it to every time component is visible.
const navigationExtras: NavigationExtras = {
state: { billingInfoData: billinfoData…

nirmal
- 2,143
- 1
- 19
- 29
1
vote
1 answer
Do angular need 3rd party state management like NGRX, NGXS, Akita?
Do we need state managers like NGRX, NGXS, Akita in angular 4+ meanwhile we already have observables in framework.

Muhammad Muzamil
- 1,013
- 2
- 18
- 25
1
vote
1 answer
What's the proper way to manage checkbox state in Angular 8?
I have two lists, flavors and juice.
flavors = ['Apple', 'Orange', 'Banana', 'Cherry'];
juice = [];
I am using checkbox to call a method that updates the flavors in my juice list.

Miniversal
- 129
- 2
- 13
1
vote
1 answer
Searching Data From Different Component in Angular NGXS
I'm trying to figure out how will i able to search in NGXS from different component. I have my searchbar from the navbar component while i'm displaying my data from app component which is a different component.
Please see this stackblitz link
CLICK…

Joseph
- 7,042
- 23
- 83
- 181
1
vote
1 answer
Persisting the view state in an angular application
I have a view where I have few text inputs.The visibility of the inputs can be controlled by the user. When the user navigates across the application & returns back to the same page the state of the view should be as he had left the page (for that…

Krishna PrabhuGaonkar
- 42
- 1
- 7
0
votes
0 answers
Linked list using NgRx in angular
I'm trying to do a basic crud operation in angular using linked list with NgRx (state management)
I created a node with value "1" and 1st time head and tail is updated
2nd time, I created another node with value "2"
tail node is "1". and it's next…

Kathiravan S
- 9
- 1
0
votes
0 answers
@angular-redux show state is undefined while fetching from ngRedux store
I am trying to read the configuration from store, and i have returned the default state in all the reducers still not able to figure out why do i get state as undefined, can anyone please guide on this
below is the ts file line (we call below line…

user1498069
- 124
- 2
- 14
0
votes
1 answer
Why do we need ngrx/store even we can use services and localStorages?
In angular, we are maintaining the state using ngrx/store. My doubt is we can handle all of the kinds of stuff even with the services. What are the advantages of handling the ngrx/store package? Kindly inform me.Thanks in advance.

Manoj Kumar
- 25
- 7
0
votes
1 answer
How to Dispatch action which depends on Http method?
I am using NGXS for state management in my angular application.
Which one is a good practice?
First HTTP call then Dispatch action in it's subscription?
First Dispatch action and then HTTP call in it's pipe method?
For example, what is the process…

Abir Mahmud
- 96
- 1
- 7
0
votes
0 answers
Angular back button with query parameter state in reusable component
So in my angular layout component i've had a back button that's being used for all components
//this is the back button that is displayed on every page
** **