text: (function () { 'use strict'; angular .module('App') .factory('Users', Users); Users.$inject = ['$q', '$sqliteService']; function Users($q, $sqliteService) { return { getAll: function () { var query = "Select * FROM Users"; return $q.when($sqliteService.getItems(query)); }, add: function (user) { var query = "INSERT INTO Users (Name) VALUES (?)"; return $q.when($sqliteService.executeSql(query, [user.Name])); } }; } })();