在 angularJS 中,如何从属性文件中读取值?
connection.properties:
url="http://localhost:8080"
user= "me"
get= "GET"
post= "POST"
应用程序.js:
var app = angular.module('testing',[]);
app.controller('testCtrl',function($scope,$http) {
$http({
url: connection.properties.url ,
method: connection.properties.get,
params: {user: connection.properties.user})
});
});