我有这样的事情:
ng build --prod --no-aot
Run Code Online (Sandbox Code Playgroud)
但我无法理解它们之间的区别
ng build --prod
Run Code Online (Sandbox Code Playgroud)
和
ng build --prod --no-aot
Run Code Online (Sandbox Code Playgroud) 我是 AngularJS 的新手,我想获取 AngularJS 中多个城市的数据。
这是代码:
var app = angular.module('jsbin', []);
app.controller('DemoCtrl', function($http) {
var vm = this;
var vm1 = this;
var URL = 'http://api.openweathermap.org/data/2.5/forecast/daily';
var request = {
method: 'GET',
url: URL,
params: {
q:'',
mode: 'json',
units: 'imperial',
cnt: '7',
appid: '4e1869d8da618fde99e84483*******'
}
};
$http(request)
.then(function(response) {
vm.data = response.data.list ;
console.log(response.data);
}).
catch(function(response) {
vm.data = response.data;
});
});
Run Code Online (Sandbox Code Playgroud)