Is it possible to access a properties file from an AngularJS application that is located outside of the web server?
For example, in Java we can access a property file deployed separately from the project. Is there a way to achieve this in AngularJS?
I attempted to do this but I am receiving an 'undefined' result.
filter.properties:
key1=value1
key2=value2
sampleController.js
var app = angular.module('sampleApp', []);
app.controller('sampleController', function($scope, $http) {
$http.get('filter.properties').then(function (response) {
console.log('Value for key1 is ', JSON.stringify(response.data.key1));
});
});