我正在使用Angular ui-grid 2.0.12,是否可以在给定单元格内添加超链接,或者对于任何类型的html代码?我一直在尝试按照这个提示:在任何ng-grid中添加html链接虽然它似乎不适用于ui-grid,可能是因为ng-grid曾经表现不同或者因为语法现在不同.
的NG-格文档中包含默认标题单元模板(以及其它默认模板).
ui-grid的默认标题单元格模板是什么?
我是ui.grid的新手,并使用该教程获取包含大量数据的网格.我的版本是3.0.0.RC16,我从凉亭安装angular-ui-grid
我想使用分页但是会出错.
有2个关于分页的教程称为分页和一个分页:
这两者有什么区别?'ui.grid.pagination'时,模块'ui.grid.paging'不存在.我错过了什么?
我想使用分页示例,但总是会出错我是否需要特殊的不稳定版本?如何用凉亭安装?
谢谢!
UPDATE
同时我手动下载了不稳定版的ui-grid,实际上,分页只存在于unstable中.我无法在网上找到解释为什么会出现这种情况,所以我认为它还没有为生产做好准备.不过我想了解Pagination的区别,如果有一个bower软件包来安装不稳定版本.
同时更新 Paging已从不稳定版本中删除.似乎功能完全合并为分页.我不得不在控制器和视图中将"分页"更改为"分页",一切似乎都有效(到目前为止)
https://github.com/angular-ui/ng-grid/pull/2399
我不是唯一一个困惑的人
我正在为一个项目尝试angular的ui-grid,但发现很难为我的网格构建一个自定义模板.当我检查源代码时,我得到了以下html模板,我将其保存到文件header-template.html并在配置网格时引用它.
<div class="ui-grid-header">
<div class="ui-grid-top-panel">
<div ui-grid-group-panel="" ng-show="grid.options.showGroupPanel" class="">
<div class="ui-grid-group-panel ng-scope">
<div ui-t="groupPanel.description" class="description " ng-show="groupings.length == 0">
Drag a column header here and drop it to group by that column.</div>
<ul ng-show="groupings.length > 0" class="ngGroupList ">
<!-- ngRepeat: group in configGroups -->
</ul>
</div>
</div>
<div class="ui-grid-header-viewport">
<div class="ui-grid-header-canvas">
<!--ngRepeat: col in colContainer.renderedColumns track by col.colDef.name -->
<div class="ui-grid-header-cell clearfix" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" ui-grid-header-cell="" col="col" render-index="$index" ng-style="$index === 0 && colContainer.columnStyle($index)">
<div ng-class="{ …Run Code Online (Sandbox Code Playgroud) 尝试使用ui-grid的无限滚动功能,但没有成功.
使用3.0.0-v16和当前不稳定脚本版本(2天前发布).我正在关注http://ui-grid.info/docs/#/tutorial/212_infinite_scroll的例子.
当ui-grid调用$scope.gridOptions.onRegisterApi(gridApi)方法时,注入的gridApi对象没有infiniteScroll成员.
确实,以下行
gridApi.infiniteScroll.on.needLoadMoreData($scope, function () {...});
Run Code Online (Sandbox Code Playgroud)
加薪
TypeError: Cannot read property 'on' of undefined
at Object.$scope.gridOptions.onRegisterApi (http://...my-ctrl.js:144:35)
at Grid.renderingComplete (http://ui-grid.info/release/ui-grid-unstable.js:4791:20)
Run Code Online (Sandbox Code Playgroud)
你知道什么是错的吗?
我有一个Angular UI Grid元素.我定期在数据阵列的前面添加新项目.我一次只添加几个(比如1到5个新项目)
我希望UI Grid为要添加的新行设置动画.现在,行立即被添加,这使它变得有弹性.我希望新的行能够进行动画处理,因此UI Grid看起来很平滑地添加它们.
这很容易吗?这有选择吗?
我在Grid中插入了一些虚拟对象,在网格中显示的数据发现了一些问题.这是我的代码:
HTML:
<div class="gridStyle" ui-grid="gridOptions"></div>
Run Code Online (Sandbox Code Playgroud)
JS:
$scope.myData = [{
JobId: '196',
siteType: 'abc',
Title: 'Happy womans day',
Message: 'hello',
devicetype: 'A',
jobDuration: '819',
totalMsgs: '2016',
msgsDelivered: 'Msg not found In the whole Body',
msgsFailed: '789',
jobCreatedDate: '11-03-2015',
jobCreatedBy: 'abc@abc.com'
}];
$scope.gridOptions = {
data: 'myData'
};
Run Code Online (Sandbox Code Playgroud)
css:
.ui-grid-header-cell .ui-grid-cell-contents {
height: 48px;
white-space: normal;
-ms-text-overflow: clip;
-o-text-overflow: clip;
text-overflow: clip;
overflow: visible;
}
Run Code Online (Sandbox Code Playgroud)
数据显示在网格中,但只有一些固定宽度.无法包装长文本,例如:未找到Msg在整个Body中,显示为Msg not foun ...........
angularjs $cookiestore和之间有什么区别$cookies.
我看到了angularjs这份文件.
$ cookiestore和$ cookies正在做同样的想法,但唯一的区别是
$ cookiestore - 可以通过angular的toJson/fromJson自动序列化或反序列化从此存储中放入或检索的对象.但 $ cookies - 无法执行此操作
唯一的区别是什么?或其他什么?
我想在columnDefs中添加一些自定义字段,并希望从头模板中访问它.举个例子,我想要一个字段,比如showFile
$scope.gridOptions.columnDefs = [
{
name: 'ServiceID',
displayName: 'Service',
showFile: some data
}]
Run Code Online (Sandbox Code Playgroud)
并希望在标题模板中访问showFile ...
<div class="ui-grid-top-panel" style="text-align: center">
{{ want to access 'showFile' }}
</div>
Run Code Online (Sandbox Code Playgroud)
什么是最好的方法来做到这一点.正如我尝试使用自定义方法一样
<div class="ui-grid-top-panel" style="text-align: center">
{{grid.appScope.letter()}}
</div>
Run Code Online (Sandbox Code Playgroud)
(plnkr链路http://plnkr.co/edit/ZW43LsiLY7GdnX6XEOgG?p=preview, http://plnkr.co/edit/3E8HTz4Z2daGqRh1WHtx?p=preview)但是,该函数(grid.appScope.letter())正在被无数次呼唤.我提出这个问题,但没有得到任何答复.. https://github.com/angular-ui/ui-grid/issues/4250,https://github.com/angular-ui/ui-grid/问题/ 4314.任何人都可以建议最好的方法来实现上述任务.
我想知道在渲染Angularjs网格后触发的回调函数是什么意味着它的所有单元格都呈现为类似$ .ready()的函数