Questions tagged «ng-init»

2
AngularJS:如何在模板内部设置变量?
如何避免{{f = ...}}第三行中的语句打印出内容forecast[day.iso]? 我想避免forecast[day.iso].temperature在每次迭代中都使用等等。 <div ng-repeat="day in forecast_days"> {{$index}} - {{day.iso}} - {{day.name}} {{f = forecast[day.iso]}} Temperature: {{f.temperature}}<br> Humidity: {{f.humidity}}<br> ... </div>
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.