ngtable

AngularJS ng-repeat is not showing table data

て烟熏妆下的殇ゞ 提交于 2020-01-17 14:35:21
问题 my controller bring data from spring app data but it does not get displayed in form. When I put constants in data it works perfectly fine. here is my code in JS controller sampleApp.controller('searchCourseController', ['$scope', '$http', function($scope, $http, $routeParams, ngTableParams ) { $scope.courses = {}; $scope.searchButton=function () { var actionUrl = 'searchCourse'; var textToSearch = $("#txtTitle").val(); if (textToSearch.length == 0) { alert("Please provide search criteria.

ng-table sorting not working

☆樱花仙子☆ 提交于 2020-01-01 09:13:49
问题 I have created an application using ng-table, the application is working fine which had generated table using ng-table. The problem which i am facing is that the table sorting is not working. My code is as given below Working Demo html <table ng-table="tableParams" class="table"> <tr ng-repeat="user in myValues"> <td data-title="'Name'" sortable="'name'"> {{user.name}} </td> <td data-title="'Age'" sortable="'age'"> {{user.age}} </td> </tr> </table> script var app = angular.module('main', [

Custom filter with AngularJS ngTable

社会主义新天地 提交于 2019-12-31 13:16:06
问题 I'm trying to construct a table using ngTable, but with different custom filtering than described in the example from the ngTable page. I want filtering in place, but I don't want ngTable to render the filter selectors. I want to render them myself (above the table), and then reference them in my "getData()" method. The example referred to earlier doesn't explain how any of that machinery works. I have no idea exactly what needs to be specified in the "filter" property in each "td" element. I

What is '$data' in ngtable's HTML page

吃可爱长大的小学妹 提交于 2019-12-30 17:28:10
问题 I am using ngtable and at this place in HTML while displaying table <tr ng-repeat="row in $data"> I do not understand the use of $data, as '$' is not needed in other cases in ng-repeat. 回答1: ng-table maintains it's own scope, and $data is the data which exists in this scope, rather than your full data set, which is on the scope of the page controller. It is the property that is populated by the getData() function call in the ngTableParams() object. This usage and syntax is deprecated, and has

How to expand/collapse all rows in Angular

自古美人都是妖i 提交于 2019-12-29 08:22:25
问题 I have successfully created a function to toggle the individual rows of my ng-table to open and close using: TestCase.prototype.toggle = function() { this.showMe = !this.showMe; } and <tr ng-repeat="row in $data"> <td align="left"> <p ng-click="row.toggle();">{{row.description}}</p> <div ng-show="row.showMe"> See the plunkr for more code, note the expand/collapse buttons are in the "menu". However, I can't figure out a way to now toggle ALL of the rows on and off. I want to be able to somehow

How to expand/collapse all rows in Angular

非 Y 不嫁゛ 提交于 2019-12-29 08:22:08
问题 I have successfully created a function to toggle the individual rows of my ng-table to open and close using: TestCase.prototype.toggle = function() { this.showMe = !this.showMe; } and <tr ng-repeat="row in $data"> <td align="left"> <p ng-click="row.toggle();">{{row.description}}</p> <div ng-show="row.showMe"> See the plunkr for more code, note the expand/collapse buttons are in the "menu". However, I can't figure out a way to now toggle ALL of the rows on and off. I want to be able to somehow

How to have select filter in ngtable?

梦想与她 提交于 2019-12-29 02:07:07
问题 I am trying to have a select filter in ngtable. I followed this example but looks like if the select item has a space (eg: Not Installed or Not Running ), then it does not work (filter). I am putting up a plunker for help. There are couple of things I need help with Select does not work with space in the select item. Need exact filter match. Eg: Running select should only show Running and not Not Running . Also in ngtable example when user clicks on the select it gives an extra blank entry

Sorting ngTable doesn't work when heading gets clicked

情到浓时终转凉″ 提交于 2019-12-24 12:41:56
问题 I'm currently working on a table that requires some sorting. Since the project is using Angular (v1.2.12) I started using the ngTable module (v0.3.2). The default sorting is the title but the year can also be used as sorting option. When I load the page it works fine, but when I click a table heading the clicked column gets sorted but the sorting is not reflected in the header, also the sorting param is no longer set. When I start debugging I see that the params.sorting() returns: {title:

ng-table problems with running basic example

我只是一个虾纸丫 提交于 2019-12-24 11:54:13
问题 I wanted to run the most basic scenario of usage of the ng-table angular module: http://ng-table.com/#/ My code: <div ng-controller="View2Ctrl as vm"> <table ng-table="vm.tableParams" class="table table-striped" show-filter="true"> <tr ng-repeat="row in $data"> <td title="'Id'" filter="{ id: 'number'}" sortable="'id'"> {{row.id}}</td> <td title="'Name'" filter="{ name: 'text'}" sortable="'name'"> {{row.name}}</td> </tr> </table> </div> 'use strict'; angular.module('myApp.view2', ['ngRoute',

Angularjs ng-attr-title not working in chrome browser

旧城冷巷雨未停 提交于 2019-12-23 12:02:48
问题 I am using ng-table to display all values in table grid view. I want to display some messages when user hover the cell. So I am using ng-attr-title as a tool-tip. It's working in firfox, but it's not working in google chrome web browser. Sample Plunker Thanks. 回答1: It seems we have discuss it in other Question Here. Use Div there for resolving this issue. I have Edited your HTML BLOCK: <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1