问题标签 [angular-grid]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
angularjs - 将 ag-grid 包裹在 Angular 指令中
我正在创建一个向导来在我们的应用程序中添加一个新约会。向导的最后一页包含一个选项卡式部分,其中包含基于多个标准的所有潜在冲突。每个选项卡都是标准之一,并使用 Angular Grid 来显示冲突列表。由于每个网格都有相同的列,但包含不同的数据,我想使用指令将 Angular Grid 及其网格选项包装在模板中,然后在我的指令的另一个属性中设置 rowData。我的指令目前有以下内容:
我的观点有以下代码:
每当我运行它时,我都会遇到以下错误:
错误:[$injector:unpr] 未知提供者:angularGridProvider <- angularGrid <- inApptConflictDirective
我不确定我还需要做什么才能获得识别 ag-grid 的指令。我也尝试过使用 $compile,但最终还是出现了同样的错误。
是否需要添加其他内容才能从指令中调用第三方模块?当我使用三个单独的网格选项三次单独使用网格时,这确实有效。
提前感谢您的帮助!
angularjs - $http 不是 ag-grid 中的函数错误
我正在使用 Angular Grid (ag-grid) 来显示数据。在我的表格中,每当用户通过内联编辑添加评论时,我打算进行休息调用并将评论保存在数据库中。我已经把$http
休息的东西放进去了newValueHandler
。在调试器中,我看到它newValueHandler
被调用但$http
未定义。然后我得到错误:Uncaught TypeError: $http is not a function
似乎是一项微不足道的任务,我确信我缺少一些基本的东西。
PS Javascript 和 angularjs 的新手。
== 代码流解释 == 当用户点击完成的操作选项卡时,CompletedActionsCtrl
由路由调用。在这个控制器内部,准备并渲染了一个网格。现在,当用户编辑评论并提交它时,newValueHandler
会调用它function addCommentHandler
==更新==通过定义一个匿名函数而不是调用私有函数作为处理程序来工作。
所以删除了这个->
并添加了这个->
但问题是我需要在很多地方都有这个处理程序,这种方法会导致很多代码重复。有更好的想法吗?
angularjs - 如何使用网格(不是输入字段)在标题上添加下拉菜单?
我正在尝试从此链接使用Ui-grid
http://ui-grid.info/docs/#/tutorial/101_intro。
我在 plunker 中做了一个 ui-grid 的简单示例。我需要在“性别”上添加选择框 作为过滤器。如果我选择“男性”,它只显示“m”的数据,或者如果我选择“女性”它显示过滤器数据只有“f”值这里是我的代码
Plunker https://plnkr.co/edit/DqBgHFnwLpYM5pvg0f56?p=preview 我尝试这样 但不起作用
我不需要性别输入字段。我需要选择框或性别列的下拉列表
javascript - AngularJS 实现 ui-grid
我第一次尝试使用带有 AngularJS 的 ui-grid。我最初是在做一个关于 ngGrid 的教程......但是当我查看参考文件时,他们都说 ui-grid 在他们身上......所以现在我有点困惑。
我在我的 aspx 页面中引用了以下内容:-
我让 GridView 工作的 Javascript 如下所示:-
最后我的 aspx 身体看起来像:-
完成所有这些后,我得到一个具有以下样式的空网格,通过我的 div 类引用:-
我一定是错过了什么……不过不知道是什么。
当我在浏览器上检查控制台时,它给了我以下错误:-未捕获错误:未知提供者:$rootScopeProvider <- $rootScope
编辑:- 我在 plunker 中创建了我的代码,它可以在模拟器上运行,但不能通过我在 aspx 页面上的 Visual Studio 2013(它通过 html 页面运行):-
angularjs - Karma/Jasmine unit testing and ag-grid
I'm stuck with my Karma/Jasmine tests of an AngularJS 1.3.15 application using ag-grid 3.0.0 because of an 'undefined' when trying to access to the API functions (e.g. $scope.gridOptions.api.showNoRowsOverlay()).
After googling and trying a lot (with no luck at all), I am left with two options:
a) try to initialise somehow the grid. I've found out a solution that people from ng-grid (link) adopted:
b) try to mock the entire angularGrid module with an instruction like:
Could someone give me some hints or a guideline (even better!) for getting rid of this dependency?
Thank you in advance, Nicola
UPDATE 2016/06/19 @RamiShareef
The structure of a simple SPA that I'm following at the moment is the following:
After having set up this architecture, you'll find that mocking the agGrid calls is easier because in your Karma/Jasmine tests you just need to define a spy on the service methods that handle the grid state:
or
I hope this might help out people stuck like me with Karma/Jasmine tests!
angularjs - 如何使 angular-gridster 小部件数据内容响应?
我正在使用 angular-gridster 来设计动态用户仪表板。我们如何在调整小部件回调的大小时使 gridster 小部件数据内容响应,任何人都可以建议我如何使其响应。
angularjs - angularjs中的网格,它支持使用Spring MVC的服务器端过滤、排序和分页
我正在寻找使用Spring MVC Hibernate进行服务器端过滤、排序和分页的AngularJS 网格实现的示例代码/项目。
我可以在 Internet 上找到许多可用的网格。但是,如果有人可以帮助我提出其中最好的建议,那么分享您的示例项目将非常有帮助。
ag-grid 是不错的选择。我通过浏览找到的 AG-Grid
您能否给我一些示例代码或项目的参考,以便我了解如何实现到 SPA 应用程序(Spring MVC + Hibernate)。
angularjs - 如何在 AngularJS 中创建图像轮播的角度网格
我正在使用两个插件来实现这一点,但它不能完美地工作。这两个插件是 angulargrid 和 slick-carousel。有谁知道一个插件可以同时做到这两个?
这是我使用这两个插件时所拥有的,它几乎足够好,除了轮播会导致网格项目之间的间隙,直到页面首次加载后调整窗口大小。任何人都可以在没有任何问题的情况下让它工作吗?