ループでは最後のJSONデータのみが表示されますが、解決できません。誰かが私を助けて間違いを教えてくれることを願っています。JavascriptとAngularjsを使用するループ
<script>
angular.module('ngMap').run(function($rootScope) {
$rootScope.mouseover = function() {
console.log('mouseover', this);
this.style.backgroundColor = 'grey';
};
$rootScope.mouseout = function() {
this.style.backgroundColor = 'white';
};
$rootScope.click = function() {console.log('click')};
for (var i = 0; i < map_data.length; i++) {
$rootScope.customMarkers = [
{address: map_data[i].work_address, "class": "my1"},
];};
});
</script>