mercredi 24 décembre 2014

Angular JS and Store DB like persistance


I've got an AngularJS app with a movies array in my controllers.



app.controller("MoviesListCtrl", ["$scope",
function($scope) {
$scope.movies = [
{
id:1,
originalTitle:'Gone with the Wind',
year: 2008
},
{
id:2,
originalTitle:'Back To The Future',
year: 1988
}
];

$scope.addMovie = function(){
$scope.movies.push({
id:3,
originalTitle: 'Mitchell and Jackie'
})
};
}
]);


I'd like to simply store these objects on a database, and be able to find them by their properties. I'm using node-webkit, and about data storage, the developer gives the example of StoreDB (http://ift.tt/1nYQ6tv - http://ift.tt/1A76nUL).


I find StoreDB really simple, and it seems to fit my needs. But how can I bind it with Angular ? Have you got an equivalent made for Angular ?


Thank you





Aucun commentaire:

Enregistrer un commentaire