2016-07-28 3 views
0

Моя цель состоит в том, чтобы иметь слушателя для ячейки/строки наведению мышиUI-сетка игнорирует мой пользовательский шаблон строки

Любые мысли, почему моя реализация УИ-сетки пренебрегает мой rowTemplate и загружает по умолчанию?

Позвольте мне знать, что еще мне нужно предоставить, чтобы вам было легче помочь мне.

У меня есть MVC.net (C#) веб-приложение с угловой JS, я загружая UI-сетку через BundleConfig

bundles.Add(new ScriptBundle("~/bundles/angular").Include(
       "~/scripts/angular/angular.js", 
       "~/scripts/angular/angular-route.js", 
       "~/scripts/angular/angular-resource.js", 
       "~/scripts/ui-grid.js" 
       )); 

мои варианты UI-сетки

$scope.gridGroupCodeMapsOptions = 
     { 
     columnDefs: columns, 
     data: $scope.codeMapResults.data, 
     enableSorting: true, 
     enableColumnMenus: false, 
     flatEntityAccess: true, 
     showGridFooter: true, 
     gridFooterTemplate: "<div class='custom-footer'>{{grid.rows.length}} items</div>", 
     rowTemplate: "app/codeMaps/groupCodeMapRowTemplate.html" 
     } 

мои rowTemplate HTML:

<div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.uid" 
ui-grid-one-bind-id-grid="rowRenderIndex + '-' + col.uid + '-cell'" 
class="ui-grid-cell" 
ng-class="{ 'ui-grid-row-header-cell': col.isRowHeader }" 
role="{{col.isRowHeader ? 'rowheader' : 'gridcell'}}" 
ng-click="grid.scopeApp.notify()" 
ui-grid-cell> 

rowTemplate по умолчанию из HTML:

<div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.uid" 
ui-grid-one-bind-id-grid="rowRenderIndex + '-' + col.uid + '-cell'" 
class="ui-grid-cell" 
ng-class="{ 'ui-grid-row-header-cell': col.isRowHeader }" 
role="{{col.isRowHeader ? 'rowheader' : 'gridcell'}}" 
ui-grid-cell> 

Что я устал:

  • Plunker: rowTemplate работает на отдельном Plunker.
  • стоп/старт мой IIS в случае каких-либо chached файлов
  • Инлайн RowTemplate

ответ

0

убедитесь, что ваш groupCodeMapRowTemplate.html путь доступен и правильно

пример:

приложение URL: localhost: 8000 ваш шаблон должен быть доступен с помощью localhost: 8000/app/codeMaps/groupCodeMapRowTemplate.html

+0

Да, так оно и есть. Я также попытался представить его как встроенный rowTemplate, но получил ту же проблему –