Is there a way to dynamically change the href link of the "next" arrow in my slideshow application based on the current route? The aim is for the next arrow to navigate through all routes smoothly. What would be the most efficient approach to achieve this?
To illustrate, if the current route is '/', then the next arrow should direct to '/overall-results'. Similarly, if the route is '/overall-results', the arrow should lead to '/swim-lane'. While having a different link for each page and arrow is an option, I am curious if there is an Angular-specific method that can accomplish this.
Route setup:
angular
.module('ciscoImaDashboardApp', ['ngRoute'])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/welcome.html',
controller: 'welcomeCtrl'
})
.when('/overall-results', {
templateUrl: 'views/overall.html',
controller: 'overallCtrl'
})
.when('/swim-lane-results', {
templateUrl: 'views/swim-lane.html',
controller: 'swimlaneCtrl'
})
.otherwise({
redirectTo: '/'
});
});
The location of the navigation arrow:
<ng-view></ng-view>
<a href="#/{{nextlink}}">Next</a>