otScope.$on(&#39;$routeChangeSuccess&#39;, function() {
      batchLog($route.current ? $route.current.template : null);
    });
  }]);
</code></pre>
<p>In the example, note that:</p>
<ul>
<li>The <code>batchLog</code> service depends on the built-in <a href="api/ng/service/$interval"><code>$interval</code></a> and
<a href="api/ng/service/$log"><code>$log</code></a> services.</li>
<li>The <code>routeTemplateMonitor</code> service depends on the built-in <a href="api/ngRoute/service/$route"><code>$route</cod