angular_rails_seo 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62ce0e14d0b60226abdfe87b4ea61f026a00c81b
4
- data.tar.gz: aecd6d93747683032b28e0c17b307be8399a5b07
3
+ metadata.gz: ed48e650bf76c0a2fa63bb90408c15c0ed4b81cb
4
+ data.tar.gz: daaf3aa9ba80c5a0dc4200a2ea67a9ea2ed87a39
5
5
  SHA512:
6
- metadata.gz: bde83590bd89589ef2268f2b699511d8a0a568396f6846d1a2f41dfa0c067dc8148a2ac711483d17419dfa02487ff7e5028a90c36f522c7d15d5794546f4b844
7
- data.tar.gz: 2fe3b6e08b2bd416cfabde1d170a351aade50f8b1acb6863cdbb7e8b676071b40d96669730e5dda41ba8c851c336073300adbbe15fb53c0bed3cdea8e5d05fd6
6
+ metadata.gz: eec0981647f2f27b1d7aad3a6a0ea02bbfa4750e6c81c7abe28bb1ef4d5344d87b9cc6452de432bfc3fe7b4cb85743e526178a2e07df1983efbaab2e90d55f4f
7
+ data.tar.gz: c04efbf8e6ffa99416d18bd8ea1db3a97fcdf6e891495622fb1f5dc35cbff4e2929cdcded8a3515d3488ab51d54666db1b855e35dd9894ad001cbf25f38219ef
@@ -29,12 +29,11 @@ angular.module('angular-rails-seo', [])
29
29
 
30
30
  // Finds the matching SEO entry for the current path, or returns the default if none is found
31
31
  $seo.match = function(path) {
32
- var path = $location.path();
33
32
  var pathKeys = Object.keys(paths);
34
33
  var key, i;
35
34
 
36
35
  if (path == null) {
37
- return $seo.getDefaults();
36
+ return $seo.getDefault();
38
37
  }
39
38
 
40
39
  for (var i = 0; i < pathKeys.length; i++) {
@@ -50,7 +49,8 @@ angular.module('angular-rails-seo', [])
50
49
 
51
50
  // If we found a matching path entry apply it, otherwise use the default
52
51
  $seo.refresh = function() {
53
- var data = $seo.match();
52
+ var path = $location.path();
53
+ var data = $seo.match(path);
54
54
 
55
55
  if (data != null) {
56
56
  $seo.applyData(data);
@@ -71,11 +71,7 @@ angular.module('angular-rails-seo', [])
71
71
  paths[key].regex = new RegExp(paths[key].regex);
72
72
  }
73
73
 
74
- $rootScope.$on('$routeChangeStart', function(e, next, current) {
75
- $seo.refresh();
76
- });
77
-
78
- $rootScope.$on('$stateChangeStart', function(e, next, current) {
74
+ $rootScope.$on('$locationChangeSuccess', function(e, next, current) {
79
75
  $seo.refresh();
80
76
  });
81
77
  };
@@ -1,3 +1,3 @@
1
1
  module AngularRailsSeo
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angular_rails_seo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Ellis