Search Posts

Category: filter

angularJS Filter on dynamic attribute

I face a difficulty trying to filter on column of a a dynamic table and put the problem here if someone have already face the same problem and find a solution. Context : In an angularJS Application (1.5.8) I have custom generic table used in all my application.Each table have a specific parameter injected which create columns. Today I would like to add to this custom table a generic filter function on each column to […]

Pre Download Filter to prevent duplicate records being downloaded?

Hello Folks i have a python flask app(Angular JS for UI) that has a button which when clicked simply downloads an excel file , the problem is that the downloaded file contains exactly 2 duplicates of all records, i have applied unique filter in Angular but still the problem occurs. Thanks in Advance <div class=”col-lg-3 col-sm-3 col-md-3 col-xs-12″> <label class=”selected”>Item *</label> <select class=”form-control” ng-model=”filters.item” ng-options=”i.item as i.item for i in filter_data | unique:’item’ | orderBy:’item'” […]

Using $filter for integer (1, -1) in angularJS not working

I have problems getting length of array-elements with specified attribute using $filter. the attribute state can be 0, 1 and -1. I get sub-arrays with $filter and then check length. It wont work with state = 1. It seems that the filter also takes elements with state = -1. Is this a bug or do I need to set the filter differently? I provided a snippet to show the effekt. Thanks in advance. angular.module (‘app’, […]

$filter ui-grid using search fields

At the moment I have a ui-grid with a full name and registration columns. I also have search fields for both. If user searches for registration, the table is updated ‘on the fly’. My issue is that if the user enters both to narrow down the search e.g. registration and name at the same time. The table only reacts on a single filter input. This is part of my code responsible for watching the field […]

AngularJS Search filter only applying to active tab

<uib-tabset active=”activeForm.i”> <uib-tab index=”$index” ng-repeat=”data in” ng-click=”setTab($index)” heading={{}} > <div class=”row”> <div class=”col-xs-6 col-sm-6 col-lg-6 col-md-6; center; vAlignTop” style=”padding-bottom: 5px;” ng-repeat=”x in | filter:search ” ng-if=” ==”> So the search filter does work but the way that I need to display my data, it’s creating multiple tabs, and the filter appears to be only applying to the active tab that is opened, I need to it apply to all the tabs and […]

angular js filters working but with errors

Angular js filter Working Fine But Throwing Itteration Errors var app = angular.module(‘NGapp’, []); app.filter(‘altDate’, altDate); app.controller(‘MainCtrl’, MainCtrl) function MainCtrl($scope) { $ = { ‘listProductCost’: [{ ‘data’: 1 }, { ‘data’: 23 }, { ‘data’: 234 }, ] } } function altDate(_) { return function(value) { console.log(value) if (!value || value.length === 0) { return []; } else { var f = [] angular.forEach(value, function(data) { f.push(data[‘data’]); }) var s = [] s.push({ ‘min’: _.min(f), […]

Next Page »