Ionic List View Edit Array List (angularjs)

I am currently doing an app with a list view. In the list view, the user can edit and delete an item when they swipe the list to the left. I have the delete button working. I am not sure how to get start with the edit button. When the user clicked on the list view, it will bring up the form which the form will let the user to edit the detail inside and then they can save it. I have follow this example in Jsfiddle. This is kind of what I want, but in a list view

http://jsfiddle.net/A5xZ9/2/

Here is my code for my list view

<ion-side-menus>
                <ion-side-menu-content>
                    <ion-content>
                        <ion-header-bar class="bar-positive">
                            <button class="button button-icon" ng-click="toggleLeft()" menu-toggle="left">
                                <i class="icon ion-navicon"></i>
                            </button>

                            <h1 class="title"> Details</h1>
                        </ion-header-bar>
                        <br />
                        <br />

                        <ion-list can-swipe="listCanSwipe">
                            <ion-item ng-repeat="data in tempData"
                                      item="data"
                                     href="#/detail/{{data.id}}">


                      Name:{{data.name}}<br />



                   <ion-option-button class="button-assertive"
                                           ng-click="showPopup(data)">
                                    Delete
                                </ion-option-button>

                                <ion-option-button class="button-calm"
                                        ng-click="edit(data)">
                                    Edit
                                </ion-option-button>

                            </ion-item>

                        </ion-list>
                    </ion-content>
                </ion-side-menu-content>

Here is my array

angular.module('app')

.factory('WebApi', function () {

//Dummy Data
var name = [{
        value: "Peter",
        text: "Peter"
    }, {
        value: "John",
        text: "John"
    }, {
        value: "Lucy",
        text: "Lucy",
    }, 

var tempData = [];

//Display 100 item 
for (var i = 0; i < 100; i++) {

    var selectedName = name[Math.floor((Math.random() * name.length))];

   tempData.push({
     id: i,
     name: selectedName.text


    })
};

Here is my button in controller

$scope.edit = function (data) {
    var selectedData = data;
    console.log(selectedData);

}