From b973dad155ad09a7975e1476bd096f7b2c758eeb Mon Sep 17 00:00:00 2001 From: Nate Abele Date: Thu, 24 Apr 2014 14:09:12 -0400 Subject: [PATCH] fix(uiSref): should inherit params by default --- src/stateDirectives.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stateDirectives.js b/src/stateDirectives.js index fd818b360..be0497d5f 100644 --- a/src/stateDirectives.js +++ b/src/stateDirectives.js @@ -89,10 +89,9 @@ function $StateRefDirective($state, $timeout) { var isForm = element[0].nodeName === "FORM"; var attr = isForm ? "action" : "href", nav = true; - var options = { - relative: base - }; + var options = { relative: base, inherit: true }; var optionsOverride = scope.$eval(attrs.uiSrefOpts) || {}; + angular.forEach(allowedOptions, function(option) { if (option in optionsOverride) { options[option] = optionsOverride[option];