How can I call an Angular function on each page view?
<p>Right now I am using <code>angular.element(document).ready(init());</code> but it calls <code>init();</code> on every page refresh and not when browsing back and forth to the page. How could I call this function on every page view ?</p>

<p>I've tried also <code>onload</code> and <code>ng-init</code> and they don't work - the function doesn't get called.</p>