If you use Angular ui-router and modifClient is the state of your router, it is better to use the Angular ui-sref instead of HTML href .
Your code will look like this:
<a class="button button-info" ui-sref="modifClient">
Edit:
If you want to pass an object parameter to ui-sref , you can do it like this:
<a class="button button-info" ui-sref="modifClient({CodeClient: x.CodeClient})">
And change the state settings to include the params object:
$stateProvider.state('modifClient', { url: '/modifClient', templateUrl: 'templates/modifClient.html', params: {CodeClient: null}, controller: 'ConsultClientCtrl' });
Note:
Note that you must also update your ConsultClientCtrl controller with the $scope.CodeClient variable so that it can be updated from ui-sref .
You can read How to pass parameters using ui-sref to ui-router for the controller for further settings.
Edit 2:
After reading the last Edit, I see that you do not have the CodeClient variable in your controller, so update it as follows:
app.controller("ConsultClientCtrl", function($scope, $http) { $scope.CodeClient = null; $scope.loadClient = function(){ $http.get("http://localhost/deb/debut.php") .success(function(data){ $scope.names = data; }); } });
And in your HTML just use:
<div class="item item-divider center-text"> {{CodeClient}} </div>
Without <ion-list ng-repeat ...> and filter , since we already got the CodeClient variable in the controller.