angular $http服务
1.注入http服务
$http({ method: 'GET', url: 'rest/alarms/amsip',
data://参数 transformResponse:function(data,heard){ return data; } }).success(function(response){ //$window.open("https://" + response + ":8443/nvs/#/alarm/flash/config?tl1Cause=" + alarm.tl1Cause + "&alarmSource=" + alarm.sourceFriendlyName.substr(alarm.sourceFriendlyName.indexOf(":")+1)); $window.location="https://" + response + ":8443/nvs/#/alarm/flash/config?tl1Cause=" + alarm.tl1Cause + "&alarmSource=" + alarm.sourceFriendlyName.substr(alarm.sourceFriendlyName.indexOf(":")+1); }).error(function(error){ console.log(error); });