【发布时间】:2016-08-29 04:03:49
【问题描述】:
将数据渲染到模板res.render('account/pets/allPets', { petMap, title: 'All Pets' })
我尝试了两件事来完成这项工作
一)
var neighborhoods = [];
for (var i = 0; i < petMap.length; i++) {
neighborhoods.push(new google.maps.LatLng(petMap[i].location.loc[0],pet.location.loc[1]))
}
B)
var neighborhoods = [
each pet in petMap
new google.maps.LatLng(petMap[i].location.loc[0],pet.location.loc[1])
]
【问题讨论】:
标签: javascript node.js pug