ngtable

How to split data into multiple columns of ngtable?

橙三吉。 提交于 2019-12-23 06:15:08
问题 I have 1000+ data and I need to place it in a ngTable but instead of 1 column I need to split this data into multiple columns, say 2, with filters and pagination after 20 items. Is it possible with ngTable? For example: I have 100 items. On 1st page I will have 1st 20 items on 1st column and 2nd 20 items in 2nd column . Below is my template <div class="col-md-12"> <form role="search" class="navbar-form navbar-left"> <div class="form-group"> <input type="text" placeholder="Search" class="form

how to fix the positions of table elements angular js

巧了我就是萌 提交于 2019-12-23 04:53:31
问题 I'm binding json data to ng-table using angular js if any value is null then positions for all columns gets disturb can any one help me to fix data with column header ? see this plunker http://plnkr.co/edit/Ixvp8B0dRwOBDHflmu2j?p=preview Description should be null but all values shifted to left. Or If all values are null for any property hide that particular column 回答1: In order to determine if a column is empty you need some sort of column configuration that gets created by iterating the

How to bind title attribute value in ng-table

一笑奈何 提交于 2019-12-22 04:32:55
问题 I am using ng-table to display all values in a table view. Message to be displayed in remarks column (last column of the table) is huge. So, I am displaying few character. When user hovers over the cells I want to show the entire message in a tool-tip. I tried to set it in title attribute, but it's not working. Sample code : http://plnkr.co/edit/I4nCTNhMfxgbBX7Zjxs9?p=preview <table ng-table="tableParams" class="table"> <tr ng-repeat="doc in $data"> <td data-title="'#'" sortable="doc_name">{{

ng-table pagenation not update after delete or add new record in the data item

拟墨画扇 提交于 2019-12-22 00:42:57
问题 I am using np table in angular for data binding . ng table show paging and total number of record but when I add new row or remove one row from data model in ng table. Total row is reflected but total number of record and paging not reflected. I have used bleow code Any one can help me.. $scope.viewDeleteTemplateModel = function (templateId, name) { if (parseInt(templateId, 10) <= 0) { $scope.bindPopUpMessages(Enum.AlertType.Error, "TemplateId must be greater than zero.");//showing smart

Update bootstrap angularjs table with real time data on the fly using ng-repeat

梦想与她 提交于 2019-12-22 00:39:26
问题 i am using bootstrap table with ng-repeat to populate the table. the issue is that i cannot get the table updated and display data. i have written drag and drop element in my angularjs. once i drag and drop some file over it i get that information back in my controller. this drag and drop is a custom directive. the problem is that i am getting the file detail in my controller $scope.getFiles = function(res) { $scope.fileList = res; console.log(res); } In HTML <file-drop fetch-files="getFiles"

Sorting is not working in ngTable when using nested json

爷,独闯天下 提交于 2019-12-20 01:56:05
问题 I have created an application in angularjs with ngTable, The application is working fine but sorting is not working. My json structured is nested, but values are coming correctly with the table Can anyone please tell me some solution for this My code is as given below JSFiddle html <div ng-controller="IndexCtrl"> <table border="1" ng-table="mytable"> <tbody ng-repeat="peop in peoples"> <tr ng-repeat="people in peop"> <td sortable="'id'" data-title="'Id'">{{people.id}}</td> <td sortable="

Add item json in ANGULAR with pop-up

爱⌒轻易说出口 提交于 2019-12-19 21:51:58
问题 I'm doing a web app. I have a dynamic table . First, you choose a PRODUCT and then the LOT . The list of item in the select are taken by json. Now the problem is that I want to add the possibility to create new item to add in the <select> LOT . So, first I tried to add the field in the LOT column using the following codes: $scope.addLot = function(id,val,lotId) { // console.log(id); var inWhichProduct = id; var newArray = { "value": val, "id": lotId }; //console.log($scope.items) angular

AngularJS ngTable filtering by Date

孤街醉人 提交于 2019-12-19 02:38:10
问题 I'm trying to set up ngTable in my application, but it doesn't support filtering by Date, and I can't figure out how to implement it. I initially had the date in my data as a timestamp, which allowed me to sort the column properly due to the incremental nature of a timestamp, but obviously I can't type September and filter the data. // Example row data from data array { "index": 0, "id": "54587313ac91d561b246bf90", "user": "user3", "date": 1390054873445, "status": "in-progress" } I tried

Angular ng-table dynamic headers doesn't work inside

瘦欲@ 提交于 2019-12-18 13:35:22
问题 I am using ng-table with dynamic columns, using the creator's example found at http://bazalt-cms.com/ng-table/example/20 It worked just fine, until i tried to wrap on a directive with transclude, witch caused the headers to disappear as seen on http://plnkr.co/edit/mjYVEf. index.html <!DOCTYPE html> <html> <head> <script data-require="angular.js@*" data-semver="1.2.0-rc3-nonmin" src="http://code.angularjs.org/1.2.0-rc.3/angular.js"></script> <script data-require="ng-table@*" data-semver="0.3

ngTable filtering on nested fields

断了今生、忘了曾经 提交于 2019-12-18 06:17:28
问题 I've got a list of invoices in ng-table and would like to be able to filter on a nested attribute. The json looks like this; [ { id: 1, date: "20/03/2014", no: "1", client: { fullname: "ABC Catering" } } ] My view look like this <table ng-table="tableParams" show-filter="true" class="table"> <tr class='listing' ng-repeat="invoice in $data"> <td data-title="'Invoice No.'" sortable="'no'" filter="{'no':'text'}"> {{invoice.no}} </td> <td data-title="'Date'" sortable="'date'" filter="{'date':