Skip to content

Commit

Permalink
fix(uiSref): add absolute to allowed transition options
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaneeb Kamran committed Feb 11, 2015
1 parent 40e7a4f commit ae1b3c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/stateDirectives.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion test/stateDirectivesSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ describe('uiStateRef', function() {
describe('transition options', function() {

beforeEach(inject(function($rootScope, $compile, $state) {
el = angular.element('<a ui-sref="contacts.item.detail({ id: contact.id })" ui-sref-opts="{ reload: true, notify: true }">Details</a>');
el = angular.element('<a ui-sref="contacts.item.detail({ id: contact.id })" ui-sref-opts="{ reload: true, absolute: true, notify: true }">Details</a>');
scope = $rootScope;
scope.contact = { id: 5 };

Expand All @@ -385,6 +385,7 @@ describe('uiStateRef', function() {
$timeout.flush();

expect(transitionOptions.reload).toEqual(true);
expect(transitionOptions.absolute).toEqual(true);
expect(transitionOptions.notify).toBeUndefined();
}));
});
Expand Down

0 comments on commit ae1b3c4

Please sign in to comment.