Hi can someone please specify how to achieve push transition and how replace transition in side menu example.
I saw that playlist is push and others are replace, but I cannot understand difference between them.
My UI Router config contains this state:
.state('app.category', {
url: '/category/:categoryId',
cache: false,
views: {
'menuContent': {
templateUrl: 'templates/category.html',
controller: 'CategoryCtrl',
resolve: {
resolvedCategory: function ($q, $stateParams, categoryService) {
var deferred = $q.defer();
categoryService.getCategoryById($stateParams.categoryId).then((cat) => {
deferred.resolve(cat);
}).catch((err) => {
deferred.reject(err);
});
return deferred.promise;
}
}
}
}
})
But when I try to navigate manually to:
http://localhost:8100/#/app/category/9693BF2B-390C-F47C-FF7C-5485B7743400
It opens normally as expected by - replace
But anytime i try to navigate to same address programmatically ->
$state.go(‘app.category’, {categoryId: cat.objectId});
or
href="#/app/category/{{cat.objectId}}"
its pushing view I have no idea why there is difference