I followed a tutorial that showed how to use angularjs and load json data based on menu slug and show it in the page. The demo is here: https://dl.dropboxusercontent.com/u/28763/angular-tutorial/index.html#/page/home
When I refresh the homepage (https://dl.dropboxusercontent.com/u/28763/angular-tutorial/index.html#/page/home), I get a js error in firebug that notes:
$digest already in progress
or
$rootScope.pages is undefined
This usually happens the time after the initial pages.json load. So if I update the pages.json file, I can hit refresh and see the new data, but if I refresh again I get the error. If you click a menu item, About for example, you will see the About page. Click home and it is there. Refresh the browser and get an error.
Also the page shows where the content should render:
{{page.title}}
{{page.content}}
...rather than the title and content. I am super new to AngularJS and am not finding a reason why this isn't working here consistently.
I have the .otherwise({redirectTo: '/home'});
in there, and it does redirect there, however, the data doesn't always do the same...
If this is due to the pages.json file loading quick enough, how do I go about making sure the file is completely loaded before moving on? Or might there be another reason someone sees?
EDIT: Here is a Plunker of my setup: http://plnkr.co/edit/8QpsLHhPA58uZnbAHgck?p=preview