1,284
questions
0
votes
0
answers
12
views
Ionic NGRX Signal Store auth not triggered after relogin
I have an issue with my Angular 18 and Ionic 7 application, which uses NGRX Signal Store. During logout, I'm able to clear the localStorage and set the isAuthenticated and token states to false and ...
0
votes
1
answer
62
views
What's the best way to give hosted React components access to my Angular sevices?
I'm migrating an existing React app over to Angular. Each React component will eventually be rewritten, but in the meantime I'm hosting them in Angular components based on this method: https://medium....
0
votes
0
answers
27
views
NgRX Store - init with Login (or Logout)
I can define my NgRxSignalStore with something like
export const MyStore = signalStore(
{ providedIn: 'root' },
withState(initialValues4Store),
withMySignalState(),
....
export ...
0
votes
1
answer
63
views
Object.defineProperty called on non-object
When I add provideEffects to my module, I encounter an error. However, when I remove it, the auth.effects.ts file doesn't work as expected and fails to make API calls:
However I get this error:
at ...
1
vote
1
answer
52
views
NgRX Store and rxMethod with specific condition
I'm using the NgRx Store and want to use the rxMethods at the ngOninit.
I follow the guideline of the NgRX Store for rxMethods. The sample is quite close what I'm looking for. But I have no clue how ...
1
vote
2
answers
56
views
Why does my state observable tell me Type must have a [Symbol.iterator]()
Framework: Angular v18.1.0
Dependencies:
RxJS v7.8.0
@ngrx/effects v18.0.2
@ngrx/store v18.0.2
Given the following RxJS architecture. I have a simple reducer with one state and an interface with a ...
0
votes
1
answer
33
views
Ngrx Pattern to set propery IsLoading while fetching new data from server
I have a store with actions, effects, reducers, and selectors. I have a component on the screen, and the component represents a store object, obtained via a selector.
What I'm trying to do is, I think,...
2
votes
1
answer
180
views
Setting custom primary key with NgRx signal store withEntities
Problem
I have an ngrx/signalStore that contains fruits as entities. For proper usage of the signalStore, you need to have an id field in the Fruit class, but the API I use retrieves fruits that have ...
0
votes
3
answers
783
views
How can I call a method inside another signal store method
I have a signal store with method loadItems() and a method countItems(). loadItems should call countItemsat the end of its operation. How is that possible? Is that possible at all. And would that also ...
0
votes
2
answers
104
views
When do you unsubscribe to an observable in angular component?
When we use ngrx with angular, let's say I fetch data from a selector in a component in a variable, in ngOnDestroy should I unsubscribe to using the unsubscribe method or does ngrx select method do it ...
0
votes
0
answers
18
views
How to pass StoreEffects to children routes using provideEffects?
I have this code:
export const PROJECT_ROUTES: Routes = [
{
path: '',
component: FeatureShellComponent,
providers: [
provideEffects([
MyStore1Effects,
...
1
vote
2
answers
75
views
Angular Observable firing twice, first one empty
I have a call in the constructor of a component to select an account (the store.dispatch is in ngOnInit) and it seems to emit two values, one empty, the next successful. The console.log in the code ...
-1
votes
2
answers
30
views
Store files getting undefined when refreshing the page
Store files getting undefined when refreshing the browser,
public getStateFile = (): StateFiles => {
return this.store.selectSnapshot(StateFileState).stateFile;};
this is the store operation for ...
2
votes
0
answers
144
views
Unable to use ngrx effect with MSAL protected resources and getting error, acquireTokenSilent failing
In my angular 17 app, I'm using ngrx with Msal 3.0 with Azure B2C authentication. There is an API end point which requires authentication and present in the protected resources of msal config like ...
0
votes
1
answer
458
views
NgRx Signal Store is not updating the state
Scenario: I need to make a kanban board with ToDo, In-Progress and Done items. The user should be able to drag and drop items around in different swimlanes, create new to-do items and remove items. I ...