I would like to use the angel+monaca contact plug-in to display a list of contacts.
app.controller('MainController', function($scope){
document.addEventListener("device ready", function(){
var options = new ContactFindOptions();
options.filter="";
options.multiple=true;
varfields = ["*"];
contact=navigator.contacts.find(
fields
, function(success) {$scope.contact=success;}
, function(contactError) {aleat('contactError');}
, options
);
}, false);
});
<ons-pageing-controller="MainController">
<ons-list>
<ons-list-item modulator="chevron" class="item">
<ons-row>
<ons-col>
<header>
<span class="item-title">{{contact[0].id}}</span>
...
It doesn't show at all.What's wrong with you...
monaca onsen-ui cordova angularjs
After rewriting js like this, the error no longer appears (I was also able to confirm that it goes into function(success){}
).
When using Onsen UI, the description seems a little different from AngularJS (although it may depend on how you do it).
ons.bootstrap()
.controller('MainController', function($scope){
document.addEventListener('device ready', function(){
var options = new ContactFindOptions();
options.filter="";
options.multiple=true;
varfields = ["*"];
contact=navigator.contacts.find(
fields
, function(success) {$scope.contact=success;}
, function(contactError) {aleat('contactError');}
, options
);
}, false);
});
However, this does not seem to hold the value set in function(success){$scope.contact=success;}
, so it may need to be corrected.
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.