
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@angular-redux/router
Advanced tools
Bindings to connect @angular/router to @angular-redux/core
npm install @angular-redux/router --save
routerReducer
when providing Store
:import { combineReducers } from 'redux';
import { routerReducer } from '@angular-redux/router';
export default combineReducers<IAppState>({
// your reducers..
router: routerReducer,
});
import { NgModule } from '@angular/core';
import { NgReduxModule, NgRedux } from '@angular-redux/core';
import { NgReduxRouterModule, NgReduxRouter } from '@angular-redux/router';
import { RouterModule } from '@angular/router';
import { routes } from './routes';
@NgModule({
imports: [
RouterModule.forRoot(routes),
NgReduxModule,
NgReduxRouterModule.forRoot(),
// ...your imports
],
// Other stuff..
})
export class AppModule {
constructor(ngRedux: NgRedux<IAppState>, ngReduxRouter: NgReduxRouter) {
ngRedux.configureStore(/* args */);
ngReduxRouter.initialize(/* args */);
}
}
When using a wrapper for your store's state, such as Immutable.js, you will need to change two things from the standard setup:
UPDATE_LOCATION
and return the payload merged into state.selectLocationFromState
option on NgReduxRouter
's initialize()
.These two hooks will allow you to store the state that this library uses in whatever format or wrapper you would like.
Depending on your app's needs. It may need to supply the current URL of the page differently than directly
through the router. This can be achieved by initializing the bindings with a second argument: urlState$
.
The urlState$
argument lets you give NgReduxRouter
an Observable<string>
of the current URL of the page.
If this argument is not given to the bindings, it defaults to subscribing to the @angular/router
's events, and
getting the URL from there.
10.0.0 (2019-05-04)
FAQs
Keep your Angular 2+ router state in Redux.
The npm package @angular-redux/router receives a total of 1,589 weekly downloads. As such, @angular-redux/router popularity was classified as popular.
We found that @angular-redux/router demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.