The following call,
$http.get('//pruebarails-alevale.c9.io/').
success(function(data, status, headers, config) {
console.log('Success in getFromApi');
console.log(data);
console.log(data.messages); //undefined (only in mobile)
}).
error(function(data, status, headers, config) {
console.error('Fail en getFromApi!');
});
instead of printing the JSON in the ANDRIOD APP is printing this.
start("/");I/chromium( 2225): addRow("..","..",1,"0 B","5/21/15, 2:03:25 PM");
I/chromium( 2225): addRow("acct","acct",1,"0 B","5/21/15, 2:03:25 PM");
I/chromium( 2225): addRow("cache","cache",1,"4.0 kB","5/21/15, 1:40:49 PM");
I/chromium( 2225): addRow("config","config",1,"0 B","5/21/15, 2:03:25 PM");
I/chromium( 2225): addRow("d","d",1,"0 B","5/21/15, 2:03:25 PM");
. . . ", source: file:///android_asset/www/js/services.js (43)
the CSP i have is
object-src 'self' https://pruebarails-alevale.c9.io/ 'unsafe-eval'
but any other CSP is rejected. THis also ONLY happen in the phone, in the browser it works perfectly and the console.log(data.messages); shows the right data