Reading entries from the database through AngularJS