diff --git a/docs/content/guide/services.ngdoc b/docs/content/guide/services.ngdoc index 19ccae7fc3f1..d9b554d2cd65 100644 --- a/docs/content/guide/services.ngdoc +++ b/docs/content/guide/services.ngdoc @@ -138,9 +138,13 @@ batchModule.factory('batchLog', ['$interval', '$log', function($interval, $log) */ batchModule.factory('routeTemplateMonitor', ['$route', 'batchLog', '$rootScope', function($route, batchLog, $rootScope) { - $rootScope.$on('$routeChangeSuccess', function() { - batchLog($route.current ? $route.current.template : null); - }); + return { + startMonitoring: function() { + $rootScope.$on('$routeChangeSuccess', function() { + batchLog($route.current ? $route.current.template : null); + }); + } + }; }]); ```