I work with Ionic, v1.0.0-beta.1
I have code like this:
<span ng-repeat="result in data" ng-click="opanModal(result)">{{result.name}}</span>
in controller
$ionicModal.fromTemplateUrl('templates/modal.html', function(modal){
$scope.ModalTest = modal;
},{
scope: $scope, animation: 'slide-in-right'
})
$scope.opanModal= function(value){
$scope.modalData=value;
$scope.ModalTest.show();
}
in modal:
{{modalData.name}}
For that matter the “data” This two users
- Kfir
- Rafael
If I click on “kfir” I see the name (kfir)
If I close byModalTest.remove()
and click on the "rafael"
I still see the name of “kfir”