angular_rails_seo 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed48e650bf76c0a2fa63bb90408c15c0ed4b81cb
|
4
|
+
data.tar.gz: daaf3aa9ba80c5a0dc4200a2ea67a9ea2ed87a39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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('$
|
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
|
};
|