SQLite records in JSONP request - how do that?

Hi,

In SQLite I have a table:

  • settings
    – setting
    – value

Schema:
SETTING | VALUE
trybstudiow | abcd
grupa | abcdef

services.js:

angular.module(‘myapp’)
.factory(‘TTJSON’, function($http) {
var dataSource = ‘http://my-site.com/json.php?callback=JSON_CALLBACK’;

return {
getData: function(uczelniab) {
return $http.jsonp(dataSource, {
params: {
id: uczelniab
}
});
}
}
});

and app.js:

.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state(‘TT-ActualWeek’, {
url: ‘/actual-week’,
templateUrl: ‘templates/TT-ActualWeek.html’,
controller: ‘TTController’,
controllerAs: ‘TT’
})

.state(‘TT-NextWeek’, {
url: ‘/next-week’,
templateUrl: ‘templates/TT-NextWeek.html’,
controller: ‘TTController’,
controllerAs: ‘TT’
})

$urlRouterProvider.otherwise(’/actual-week’);
})

How can I “insert” those SQLite records in JSONP (GET) request? I tried StateParams, rootScope, scope and many others…

Can anyone help me? Please :slight_smile: