如果
connection.properties是驻留在Web服务器上的文件,则只需执行以下操作:
var app = angular.module('app', []);app.controller('test', function ($scope, $http) { $http.get('connection.properties').then(function (response) { console.log('a is ', response.data.a); console.log('b is ', response.data.b); });});您可以在此处查看示例:
http://plnkr.co/edit/3Ne3roFOwcfVmg2mgnUr?p=preview



