Gathering detailed insights and metrics for ui-router-sticky-states
Gathering detailed insights and metrics for ui-router-sticky-states
Gathering detailed insights and metrics for ui-router-sticky-states
Gathering detailed insights and metrics for ui-router-sticky-states
@uirouter/sticky-states
UI-Router Sticky States: Keep states and their components alive while a different state is activated
ui-router-extras
UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
sn-ui-router-sticky-states
UI-Router Sticky States: Keep states and their components alive while a different state is activated
jtb-ui-router-extras
UI-Router Extras: Sticky states, Future States (modified), Deep State Redirect, Transition promise
npm install ui-router-sticky-states
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (91.2%)
JavaScript (8.8%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
13 Stars
533 Commits
5 Forks
3 Watchers
22 Branches
10 Contributors
Updated on Dec 09, 2022
Latest Version
1.2.0
Package Id
ui-router-sticky-states@1.2.0
Size
41.88 kB
NPM Version
4.1.2
Node Version
7.6.0
Published on
Mar 05, 2017
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
32
The initial use case for this functionality is to implement "tabs" for application modules. Using Sticky States, a single app can implement one state tree for each tab, and have them operate at the same time, in parallel to each other. Each tab is implemented as its own UI-Router state tree. While one tab is active, the other tab is inactivated, but can be reactivated without losing any work in progress.
For the tabs use case, Sticky States work best along with Deep State Redirect
A Sticky State is the root of a UI-Router state tree which can continue running even after it is "exited". The sticky state (and its children) have a different lifecycle than normal states. The views of a Sticky State (and all activated substates) are retained until one of two things happen:
If a sibling of the sticky state (or a child of a sibling) is activated, the sticky state tree will "inactivate". A transition back to the inactivate state will reactivate it.
Sticky states works requires ui-router-core
2.0.0 or above.
Run npm ls
to check the version of ui-router-core
included with the UI-Router distribution for your framework
In Angular 1, register a plugin by injecting $uiRouterProvider
in a config()
block.
1import {StickyStatesPlugin} from "ui-router-sticky-states"; 2 3angular.module('myapp', ['ui.router']).config(function($uiRouterProvider) { 4 $uiRouterProvider.plugin(StickyStatesPlugin); 5});
In Angular 2, register a plugin in your UIRouterConfig
class
1import {StickyStatesPlugin} from "ui-router-sticky-states"; 2 3export class MyConfig { 4 configure(uiRouter: UIRouter) { 5 uiRouter.plugin(StickyStatesPlugin); 6 } 7}
In React, register a plugin after creating your UIRouterReact
instance.
1import {StickyStatesPlugin} from "ui-router-sticky-states"; 2 3let router = new UIRouterReact(); 4router.plugin(StickyStatesPlugin);
Or, if using component bootstrapping, add the plugin in your routerConfig function.
1let routerConfig = (router) => router.plugin(StickyStatesPlugin); 2 3return <UIRouterReact config={routerConfig}/>;
The sticky state's view must have its own unique ui-view (not shared by other states). Create and target a named ui-view.
1let adminModule = { 2 name: 'admin', 3 sticky: true, 4 views: { 5 admin: { component: AdminComponent } 6 } 7}
The AdminComponent should remain active in the ui-view
named admin
, even if a sibling state is activated.
When a sticky state is inactive, it's often desired to hide the contents from the UI.
This can be achieved using StateService.includes
.
In some cases, ui-sref-active
may also be used to toggle a class on the named ui-view
.
This project was ported from the UI-Router Extras project for legacy UI-Router. For more information, see the ui-router extras documentation: http://christopherthielen.github.io/ui-router-extras/#/sticky
TODO: Rewrite docs
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 1/18 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
49 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More