forked from steeve/angular-seo
-
Notifications
You must be signed in to change notification settings - Fork 6
/
angular-seo.js
23 lines (23 loc) · 874 Bytes
/
angular-seo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
!function(window, document, undefined) {
var getModule = function(angular) {
return angular.module('seo', [])
.run([
'$rootScope',
function($rootScope) {
$rootScope.htmlReady = function() {
$rootScope.$evalAsync(function() { // fire after $digest
setTimeout(function() { // fire after DOM rendering
if (typeof window.callPhantom == 'function') {
window.callPhantom();
}
}, 0);
});
};
}
]);
};
if (typeof define == 'function' && define.amd)
define(['angular'], getModule);
else
getModule(angular);
}(window, document);