AngulerJs+ionic Send data from html to Controller / popupbox

I want too display Content in a pop up box . The information already comes too html. using ng-repeat="x in titles"

Question So how do I pass content too my controller.js so it can be displayed in the popup box ? NB: I was too pass the x.excerpt too ng-click="showAlert()" so it can be displayed in the popupbox.

Thanks you. :)

HTML

<ul>
  <li ng-repeat="x in titles">
  <br />
 <hr />
   <h3> {{ x.title  }} </h3>
    <p>{{x.date | date : format : 'MM-dd-yyyy'}}</p>
        <img src="{{x.featured_image.attachment_meta.sizes.medium.url}}" width="100%" >
    <span >
        <p>{{x.excerpt}}</p>

                <button class="button button-small button-assertive" ng-click="showAlert()">
                    Click here too display Content
                </button>
    </span>
  </li>
</ul>

Controller.js

 // An alert dialog
 $scope.showAlert = function() {
   var alertPopup = $ionicPopup.alert({
     title: 'Don\'t eat that!',
     template: 'This is where I want the content too be.'
   });
   alertPopup.then(function(res) {
     console.log('Thank you for not eating my delicious ice cream cone');
   });
 };

2 way Data-Binding

Thanks, Solved it using the following way:

Try

 <input type='text' ng-model="profileedit_name">
 <button ng-click="doSaveProfileEdit(profileedit_name)" >Save</button>

with

$scope.doSaveProfileEdit = function(newName) {
  alert(newName);
}