Maybe I'm doing something wrong here because I can not get this work. am I missing something?
services.js
$http({
method : 'GET',
url : 'angular.properties'
}).success(function (data, status, headers, config) {
console.log("good");
}).error(function (data, status, headers, config) {
console.log("error: " + data); // It's printing this.
});
angular.properties
{
"url": "http://localhost",
"port": "",
"default_language": "es"
}
app structure
Error
Gruntfile.js
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
connect: {
server: {
options: {
port: 9000,
base: 'app/'
}
}
},
watch: {
project: {
files: ['app/**/*.js', 'app/**/*.html', 'app/**/*.json', 'app/**/*.css'],
options: {
livereload: true
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['connect', 'watch']);
};
ANSWER
The content of the folder 'app' is what I should put on my server. So I just need the content of app, AND my angular.properties was out of this folder. That's the mistake. Now is working :) The correct structure of this is:



angular.properties?