ng-current
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -127,8 +127,8 @@ ;(function(angular) { | ||
*/ | ||
this.select = function(name, obj) { | ||
this.select = function(name, data) { | ||
var old = $rootScope.current[name] | ||
// only publish update if the current value has changed | ||
if (!angular.equals(obj, old)) { | ||
$rootScope.current[name] = obj | ||
if (!angular.equals(data, old)) { | ||
$rootScope.current[name] = data | ||
@@ -140,4 +140,6 @@ // ensure all related (and stale) rel contexts are | ||
// notify related contexts about your new state | ||
self.publish(name, obj) | ||
self.publish(name, data) | ||
} | ||
return data | ||
} | ||
@@ -220,2 +222,4 @@ | ||
}) | ||
return data | ||
} | ||
@@ -222,0 +226,0 @@ }]) |
{ | ||
"name": "ng-current", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Relational context manager for Angular", | ||
@@ -5,0 +5,0 @@ "main": "ng-current.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26623
465