I do have a webpage based on jHipster template and issue with browser back button.
Let's say that I do have two pages
- Articles list (
/articles/{id},{name}
, category id, category name) - Article details (
/article/{id}
, article id)
Articles list page displays category name set in the scope:
js:
$scope.name = $stateParams.name;
html:
<div>{{ name }}</div>
<ul>
<li ng-repeat="item in items">
<a ui-sref="article({id: item.id})">{{ item.title }}</a>
</li>
</ul>
When I enter this page it works perfectly fine. Category name is displayed, then I use the link to navigate to the article. Everything works perfectly fine. Problems start when I use browser history back button.
It does load article list state, it does download items using a service and displays the list, it doesn't show category name though. Just plain {{ name }} is being displayed.
Chrome shows weird error but Firefox shows more specific issue:
Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.4.5/$rootScope/inprog?p0=%24digest
While I do understand why it might be a problem and it's clearly described in the other SO question, I don't understand what might be the root of the problem and therefore I am unable to resolve it.