I want to get the contacts value from my a callback function.
How to have my this.recherche = contacts ?
App.provider('ContactsP', function() {
this.$get = function() {
  return function(search) {
    console.log('Factory ContactsCtrl RECHERCHE : ' + search);
    this.recherche = [];
    this.options = new ContactFindOptions();
    this.options.filter = search;
    this.options.multiple = true;
    this.fields = ["displayName", "name", "phoneNumbers"];
    navigator.contacts.find(this.fields, function(contacts) {
      //I want to put contacts into this.recherche but that doesn't work....
     this.recherche = contacts; return contacts;
    }, function(e) {
      console.log("Error finding contacts " + e.code)
    }, this.options);
  };
};
 
    