Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@uirouter/dsr
Advanced tools
UI-Router Deep State Redirect: redirect to the most recently activated child state
With Deep State Redirect, a parent state remembers whatever child state was last activated. When the user directly reactivates the parent state, they are redirected to the nested state (which was previously activated).
Deep State Redirect (DSR) is a marker you can add to a state definition.
When a child state of the DSR marked state is activated, UI-Router Extras remembers the child and its parameters. The most-recently-activate child is remembered no matter where the user navigates in the state tree. When the DSR marked state is directly activated, UI-Router Extras will redirect to the remembered child state and parameters.
One use case for DSR is a tabbed application. Each tab might contain an application module. Each tabs' state is marked as deepStateRedirect. When the user navigates into the tab, and drills down to a substate, DSR will remember the substate. The user can then navigate to other tabs (or somewhere else completely). When they click the original tab again, it will transition to the remembered ehild state and parameters of that tab, making it appear that the tab was never destructed.
Deep State Redirect can be used with StickyStates, or on its own. If used with a Sticky State, the states will be reactivated, and the DOM will be unchanged (as opposed to the states being re-entered and controllers re-initialized)
See: http://christopherthielen.github.io/ui-router-extras/#/dsr
TODO: Move docs here
By default DSR stores the most recent redirects in memory. Alternatively, you can store the redirects in Local Storage using LocalStorageDataStore or create your own DataStore.
When registering the DSRPlugin, pass an options object with a dataStore
property, i.e.:
router.plugin(DSRPlugin, { dataStore: new LocalStorageDataStore() });
The /examples
directory contains example setups for:
FAQs
UI-Router Deep State Redirect: redirect to the most recently activated child state
We found that @uirouter/dsr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.