我想在標題中添加圖像,而不是在行中添加圖像。如何在角度ui網格中添加圖像作爲標題?
var app = angular.module('app', ['ngAnimate', 'ngTouch', 'ui.grid']);
app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.gridOptions = {
enableSorting: true,
columnDefs: [
{ field: 'name' },
{ field: 'company' },
{ field: '<THIS NEEDS TO BE IMAGE>' displayName: 'Timer'}
],
data:[
{name:"Name1",company:"Company1",Timer:"10"},
{name:"Name2",company:"Company2",Timer:"11"},]
};
}]);
你可以包括你的模板,以顯示你已經嘗試了什麼? – Tristan