SHARE
TWEET

Untitled

a guest Dec 27th, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //TEMPLATE
  2. To: {{ getContactNameNumber(message.to) }}<br>
  3.  
  4. //CONTROLLER
  5. public getContactNameNumber = function(number) {
  6.     this.contacts.find(['phoneNumbers'], {filter: number, multiple: false})
  7.     .then(data => {
  8.       if(data && data[0]) {
  9.         let contact = data[0];
  10.  
  11.         return contact.displayName;
  12.       }
  13.  
  14.       return number;
  15.     });
  16.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top