Ionic framework 在Ionic Framework中添加完整的联系人详细信息
在ngCordova中联系人的官方文档中,仅显示了Ionic framework 在Ionic Framework中添加完整的联系人详细信息,ionic-framework,ngcordova,Ionic Framework,Ngcordova,在ngCordova中联系人的官方文档中,仅显示了$scope.contactForm,在其他示例(下面的链接)中,仅显示如何添加显示名称。如何添加电话号码、电子邮件、地址等字段 module.controller('MyCtrl', function($scope, $cordovaContacts) { $scope.addContact = function() { $cordovaContacts.save($scope.contactForm).then(function(
$scope.contactForm
,在其他示例(下面的链接)中,仅显示如何添加显示名称。如何添加电话号码、电子邮件、地址等字段
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
});
$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
}