Permalink
Browse files

Fix small issue with this binding.

Sometimes 'this' is not $rootScope (for instance when triggering htmlReady via a $watch). Fix that.
  • Loading branch information...
1 parent 76834ee commit 70b16393bbcab0f0fa356382832af35c6daef084 @steeve committed Jan 31, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 angular-seo.js
View
@@ -3,7 +3,7 @@
return angular.module('seo', [])
.run(function($rootScope) {
$rootScope.htmlReady = function() {
- this.$evalAsync(function() { // fire after $digest
+ $rootScope.$evalAsync(function() { // fire after $digest
setTimeout(function() { // fire after DOM rendering
var evt = document.createEvent('Event');
evt.initEvent('__htmlReady__', true, true);

0 comments on commit 70b1639

Please sign in to comment.