0
여기로드 된 객체 'result'로고 필드를 이미지 이름으로 표시하고 싶습니다. 어떻게 동적으로이 작업을 수행 할 수 있습니까? 그림과 같이json 개체에서 이미지를로드하고 각도 ui 격자에 표시 할 수 있습니다.
angular.module('myApp').controller('homecon', function ($scope, $http, $location, $rootScope) {
$http.get("http://localhost:1488/api/CompanyApi/get").success(function (res) {
$rootScope.result = res;
});
$scope.myGrid = {
data: 'result',
columnDefs: [{ field: "Comp_Name", displayName: 'Cmpany' },
{ field: 'email', displayName: 'Email' },
{ field: 'logo', cellTemplate: "<img width=\"50px\" ng-src='/logos/{{result[1].logo}}' lazy-src>" }
]
};
output for code display one image i want to display all images related with its object