在 Ionic Framework 中添加完整的联系方式

Adding Full Contact details in Ionic Framework

在ngCordova的contacts官方文档中,只写了$scope.contactForm,在其他例子中(下面的link)只说明了如何添加显示名称。我如何添加 phone 号码电子邮件、地址等字段...

module.controller('MyCtrl', function($scope, $cordovaContacts) {
  $scope.addContact = function() {
    $cordovaContacts.save($scope.contactForm).then(function(result) {
      // Contact saved
    }, function(err) {
      // Contact error
    });
  };

  // Many more features will be added shortly
});

https://blog.nraboy.com/2014/11/create-delete-search-contacts-ionic-framework/ http://ngcordova.com/docs/plugins/contacts/

$scope.contactForm = {

    "displayName": "jones",
    "name": {
        "givenName": "jones",
        "formatted": "jones "
    },
    "nickname": null,
    "phoneNumbers": [
        {
            "value": "99999999999",
            "type": "mobile"
        }
    ],
    "emails": [
        {
            "value": "xddf@dd.com",
            "type": "home"
        }
    ],
    "addresses": [
        {
            "type": "home",
            "formatted": "This Address, An Address",
            "streetAddress": "This Address, An Address"
        }
    ],
    "ims": null,
    "organizations": null,
    "birthday": null,
    "note": "",
    "photos": null,
    "categories": null,
    "urls": null
}