Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@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.
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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.