diff --git a/src/stateDirectives.js b/src/stateDirectives.js index be0497d5f..2a8ed331a 100644 --- a/src/stateDirectives.js +++ b/src/stateDirectives.js @@ -200,6 +200,26 @@ function $StateRefDirective($state, $timeout) { * * * + * + * @example + * Given the following template where `app.users` is an abstract state and `app.users.default` its default child state: + *
+ * 
+ * 
+ * + * When the app state is "app.users" (or any children states), + * the resulting HTML will appear as (note the 'active' class): + *
+ * 
+ * 
*/ /** @@ -250,6 +270,8 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) { function isMatch() { if (typeof $attrs.uiSrefActiveEq !== 'undefined') { return $state.$current.self === state && matchesParams(); + } else if(typeof $attrs.uiSrefActiveIncludes !== 'undefined') { + return $state.includes($attrs.uiSrefActiveIncludes) && matchesParams(); } else { return $state.includes(state.name) && matchesParams(); }