I have successfully implemented breadcrumb navigation in my application. It works fine when I navigate to pages through the navbar. However, I am facing an issue with the breadcrumb when I click on a button on my page that uses $location.path. How can I call state on cnaRsk function and make the breadcrumb work?
main.html
<button require-control-point="RISK_ADD;ALIGN_RISK_ADD"
class="btn btn-default pull-right " type="button" ng-click="cnaRsk()">Create And Align New Risk</button>
main.js
$scope.cnaRsk = function () {
$location.path('/risk/cnaRsk/' + $scope.processDTO.processKey);
};
app.js
.state('app.editRiskProcess', {
url: '/risk/create/:processId',
templateUrl: 'views/risk/createNewRisk.html',
controller: 'RiskCtrl',
data: {
authenticate: true
},
breadcrumb: {
title: 'riskInProcess :processId',
path: ['app.home', 'app.editProcess', 'app.editRiskProcess']
}
})