From ae1b3c4eedc37983400d830895afb50457c63af4 Mon Sep 17 00:00:00 2001 From: Shaneeb Kamran Date: Wed, 11 Feb 2015 12:21:57 +0500 Subject: [PATCH] fix(uiSref): add absolute to allowed transition options --- src/stateDirectives.js | 2 +- test/stateDirectivesSpec.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stateDirectives.js b/src/stateDirectives.js index 34dfc1a9f..27159274f 100644 --- a/src/stateDirectives.js +++ b/src/stateDirectives.js @@ -78,7 +78,7 @@ function stateContext(el) { */ $StateRefDirective.$inject = ['$state', '$timeout']; function $StateRefDirective($state, $timeout) { - var allowedOptions = ['location', 'inherit', 'reload']; + var allowedOptions = ['location', 'inherit', 'reload', 'absolute']; return { restrict: 'A', diff --git a/test/stateDirectivesSpec.js b/test/stateDirectivesSpec.js index f44d1f478..309da5612 100644 --- a/test/stateDirectivesSpec.js +++ b/test/stateDirectivesSpec.js @@ -366,7 +366,7 @@ describe('uiStateRef', function() { describe('transition options', function() { beforeEach(inject(function($rootScope, $compile, $state) { - el = angular.element('Details'); + el = angular.element('Details'); scope = $rootScope; scope.contact = { id: 5 }; @@ -385,6 +385,7 @@ describe('uiStateRef', function() { $timeout.flush(); expect(transitionOptions.reload).toEqual(true); + expect(transitionOptions.absolute).toEqual(true); expect(transitionOptions.notify).toBeUndefined(); })); });