Bring contacts from your smartphone

1

I've made an application to bring the device contacts. My question is the following when I bring the phone it brings me an array, with the type: mobile, value="" with the phone, how can I make a treatment to only bring the number?

<ion-list><ion-itemng-repeat="contact in contacts">
                {{contact.displayName}}, {{contact.phoneNumbers}
            </ion-item>
        </ion-list>


    .controller("contatosCtrl", function ($scope, $cordovaContacts) {

        $scope.getContactList = function () {
            $cordovaContacts.find({
                filter: ''
            }).then(function (result) {
                $scope.contacts = result;
            }, function (error) {
                console.log("ERROR: " + error);
            });
        }

    });
    
asked by anonymous 08.09.2016 / 20:18

1 answer

1

The solution to the problem was to use the array position, scroll down as it was.

{{contact.displayName}} , {{contact.phoneNumbers[0].value}}

    
08.09.2016 / 21:19