I would like to use the monaca contact plug-in to display the contact list.
app.controller('MainController', function($scope){
…
});
ons.ready(function(){
// contact = new Contact();
var options = new ContactFindOptions();
options.filter="";
options.multiple=true;
varfields = ["*"];
contact=navigator.contacts.find(
...
App.controller('MainController', function($scope) {
before loading the file defining ContactFindOptions (Cordova)
…
});
If you want to bind the value obtained in ContactFindOptions to the MainController properties, you do not know how to describe it.I'm sorry I'm a beginner.
When cordova is ready, the devicesready
event is triggered.
document.addEventListener("device ready", function(){
alert('ok');
}, false);
Perhaps you can do this by:
app.controller('MainController', function($scope){
var options = null;
document.addEventListener("device ready", function(){
options = new ContactFindOptions();
}, false);
});
Am I correct in understanding that AngularJS+cordova works together?
Here may also be helpful.
© 2024 OneMinuteCode. All rights reserved.