I'm using ngRoute to filter through a list of stories into one specific story when clicked, as below:
myApp.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/stories', {
templateUrl: '/partials/stories.html',
controller: 'StoryListCtrl'
}).
when('/stories/:storyID', {
templateUrl: '/partials/story.html',
controller: 'StoryDetailCtrl'
});
}]);
This works fine, but how can I get the "next" and "previous" stories. The user needs to be able to swipe left and right between the stories, but I can't simply load them all - I need to load each story and one either side of it. Then, when the user swipes either way, one story is removed and a new one is added.
Is this possible with Angular? I've searched like crazy but can't find any reference to this online anyway.
Thanks for your time!