biophoton / angular-ngrx-refactoring Goto Github PK
View Code? Open in Web Editor NEWHow to upgrade to ngrx store showed in a step by step example
License: MIT License
How to upgrade to ngrx store showed in a step by step example
License: MIT License
Below you have a check list to follow.
A detailed step by step description on how to solve the exercise is in the wiki.
state-management
under pages/flight
flightReducer
form app.module.ts
ngrx/flight.actions.ts
and ngrx/flight.reducer.ts
to the newly created folder state-management
flightReducer
in pages/flight/state-management
by using the StoreModule.forFeature
method
flightEffects
in pages/flight/state-management
by using the EffectsModule.forFeature
method
ngrx
folder. Create .module
for global state management file and move IDB
interface into separate file.Below you have a check list to follow.
A detailed step by step description on how to solve the exercise is in the wiki.
npm install
in you consoleng serve
in your colsoleBelow you have a check list to follow.
A detailed step by step description on how to solve the exercise is in the wiki.
@ngrx/store
module over npm npm install --save @ngrx/store
Hello,
Any idea on how to access the State inside a Store from another Feature module?
Thanks
Hi,
I have found a mistake in your code.
Please, consider this statment:
.filter((n: any) => {
return n.payload.event.url.indexOf('flight')
})
The indexOf method returns the index of the element or -1 if the element not exists.
However, your filter expects a boolean value (true or false), so under the hood, the value will be converted to boolean. But if you check Boolean(-1) it returns true.
Therefore this filter will always return true.
To make it works you have to compare it with -1:
.filter((n: any) => n.payload.event.url.indexOf('flight')) !== -1
Below you have a check list to follow.
A detailed step by step description on how to solve the exercise is in the wiki.
@ngrx/effects
module over npm npm install --save @ngrx/effects
FindFlight
action with paramsBelow you have a check list to follow.
A detailed step by step description on how to solve the exercise is in the wiki.
Below you have a check list to follow.
A detailed step by step description on how to solve the exercise is in the wiki.
@ngrx/store-devtools
module over npm npm install --save @ngrx/store-devtools
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.