Skip to content

Commit ee292fd

Browse files
re-built and re-release 0.2.11
1 parent 80d8fee commit ee292fd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

release/angular-ui-router.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
28262826
* - **`lossy`** - {boolean=true} - If true, and if there is no url associated with the state provided in the
28272827
* first parameter, then the constructed href url will be built from the first navigable ancestor (aka
28282828
* ancestor with a valid url).
2829-
* - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url.
2829+
* - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.
28302830
* - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'),
28312831
* defines which state to be relative from.
28322832
* - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl".
@@ -2836,7 +2836,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
28362836
$state.href = function href(stateOrName, params, options) {
28372837
options = extend({
28382838
lossy: true,
2839-
inherit: false,
2839+
inherit: true,
28402840
absolute: false,
28412841
relative: $state.$current
28422842
}, options || {});
@@ -3263,11 +3263,12 @@ function $ViewDirective( $state, $injector, $uiViewScroll) {
32633263
}
32643264

32653265
function updateView(firstTime) {
3266-
var newScope = scope.$new(),
3266+
var newScope,
32673267
name = getUiViewName(attrs, $element.inheritedData('$uiView')),
32683268
previousLocals = name && $state.$current && $state.$current.locals[name];
32693269

32703270
if (!firstTime && previousLocals === latestLocals) return; // nothing to do
3271+
newScope = scope.$new();
32713272
latestLocals = $state.$current.locals[name];
32723273

32733274
var clone = $transclude(newScope, function(clone) {
@@ -3654,4 +3655,4 @@ function $IncludedByStateFilter($state) {
36543655
angular.module('ui.router.state')
36553656
.filter('isState', $IsStateFilter)
36563657
.filter('includedByState', $IncludedByStateFilter);
3657-
})(window, window.angular);
3658+
})(window, window.angular);

0 commit comments

Comments
 (0)