Being new to Angular, I have come across the following code snippet:
HTML template:
<a href="" ng-click="goToCategories();">See categories</a>
JS File:
$scope.goToCategories= function () {
CategoriesService.getCategory().then(function () {
$state.go('home.cat');
});
};
JS File 2:
$stateProvider.state('home.cat', {
parent: 'logged',
url: '/cat',
templateUrl: 'home/home-cat.html',
...
});
One issue I encountered is that when on home-cat.html
, the browser back button does not effectively navigate back. It seems to remain stuck on home-cat.html
. How can this be resolved?
Appreciate any guidance on this matter!