How to add next Item Click and Previous Item Click event for a List Item

I have a list Item which works is a master-detail arrangement. On the details page I want to be able to add a Next and Previous button to that users can be able to navigate back to the next page or the previous page. Thank you.

Where are the items held?

In my home.ts file. It is a json array, with title and details.

Then I would suggest moving it to a service provider that can be injected in any page that needs it.

I am not trying to go to the next page. The whole data is displayed one one page (the details page) based on item selected on the list. But while on the details page I need to create two buttons, one for previous item and another for next item. I just need the code to do that in typescript. Thanks.

I hv this by research

controller("MyCtrl", function($scope) {
    $scope.dataSet = [
    $scope.current = $scope.dataSet[0],
    $ = function(){
        var i = $scope.getIndex($scope.current.index, 1);
        $scope.current = $scope.dataSet[i];
    $scope.previous = function(){
        var i = $scope.getIndex($scope.current.index, -1);
        $scope.current = $scope.dataSet[i];

But want it written in typescript

Finding random code on the Internet that is written for a completely different framework is not very scalable. Please go through the Tour of Heroes to get familiar with core Angular concepts.