私の目標は、セル/行のマウスホバーのリスナーを持つことです
ui-grid の実装が my を無視してrowTemplate
デフォルトのものをロードする理由は何ですか?
皆さんが私を助けやすくするために、他に何を提供する必要があるか教えてください.
angular jsを使用したMVC.net(C#)Webアプリがあり、ui-gridを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 を停止/開始します
- インライン RowTemplate