IonicPopUp showing http.post result data

Hi

How can i pass data from http.post results to an IonicPopUp?

Inside my http.post success section i do create the alertPopUp function passing data as parameter .

It opens the popup but there is no data to show.

Here is the code i do use the sample from http://ionicframework.com/docs/api/service/$ionicPopup/ :

$scope.showAlert = function(data) {

 var alertPopup = $ionicPopup.alert({

    title: 'Detais',
    template: 'Details : 1. {{result}} 2. {{state}} {{result.vehicle_brand}} 2. {{scope}}'
 });
 alertPopup.then(function(res) {
     console.log('Thank you for not eating my delicious ice cream cone');
 });
};

http://ionicframework.com/docs/api/service/$ionicPopup/

you need to pass the $scope object or a custom scope-object to the popup --> so put your results on the $scope-object or create a new one with the response data.

$ionicPopup.alert({
  scope: $scope,
  title: 'Detais',
  template: 'Details : 1. {{result}} 2. {{state}} {{result.vehicle_brand}} 2. {{scope}}'
});