Angular app only loads on page refresh

admin

Administrator
Staff member
I am building a wordpress site with a page that is an angular app. It was working until recently (and I can't recall which change broke it), but now the app does not load when I arrive at the page via a link (angular is loaded and the code snippet below processed, but nothing is logged), but it <strong>does work</strong> if I then refresh the page.

I've backed out all the real code to leave:

Code:
angular.module("af2015App", [])
.controller("TestCtrl", function() {
    console.log("test test");
});

And commented out everything in the HTML except

Code:
&lt;div ng-app="af2015App" class="app"&gt;
    &lt;p ng-controller="TestCtrl"&gt;Use the ...!&lt;/p&gt;
&lt;/div&gt;

I'm at a loss as to how to debug these circumstances. I'm <strong>not</strong> loading pages via AJAX.