jeudi 6 août 2015

Using ng-repeat and SQLite Database

I have created a Cordova App that displays data from a web service. The app allows the user to save the data (contacts) to the apps Local Storage. The user has the ability to go back and display all the contacts and delete if they want. Everything works fine, but now I want to store my data (contacts) in an SQLite DB located in the app. I have the app working where when the user saves a contact it will still be stored in Local Storage, but will also be stored in my database. The problem is my app is using AngularJS to iterate over an object of contacts to display them, but when I retrieve my contacts from the database, they are in an Array, which Angular will not iterate over using the ng-repeat. I have tried converting the array to an object but that doesn't work. It seems there should be a simple answer using AngularJS. Has anyone ever tried to use the ng-repeat and an SQLite DB diplaying the data using ng-repeat?

Aucun commentaire:

Enregistrer un commentaire