Search Posts

Category: filter

How to filter Date format "2016-09-12 11:21:50 BRT" to format dd/MM/yyyy on Datatable or Angular Controller?

I need convert a date from back-end (JAVA) to front-end (Angular), the format date is “2016-09-12 11:21:50 BRT” or “2016-09-12 11:21:50 BRST”. I using a datatable javascript to populate a table on front-end. I need a filter for datatable or angular controller, I try used $filter of Angular, but did not work. Source: AngularJS

How to filter the list of countries by its first letter while search in ui-select using angular js?

How can i search the word by filtering the list by its first letter? <td class=”country-selection-cell”> <ui-select multiple ng-disabled=”service.serviceName === null” ng-model=”service.countries” close-on-select=”false” ng-change=”vm.checkIfDuplicatesExist(newServiceWithCountriesForm)” ng-attr-title=”{{service.serviceName === null?’Please select a service first’:’Choose countries’}}” ng-required=”true”> <ui-select-match placeholder=”Select countries…”> {{$item}} </ui-select-match> <ui-select-choices repeat=”country in vm.countries | filter:$ track by $index” position=’down’> {{country}} </ui-select-choices> </ui-select> </td> Source: AngularJS

GroupBy and limitTo does not work together ? AngularJS

I googled very hard but can’t find solution for this. I want to use groupBy and limitTo together but its does not work. My code: <ul ng-repeat=”(key, value) in items | groupBy: ‘group’ | limitTo: limit”> … </ul> JS: $scope.limit = 2; // its dinamic value $scope.items = [ {name: “Audi”, group:1}, {name: “BMW”, group:1}, {name: “Dodge”, group:2}, {name: “Fiat”, group:2}, {name: “Ford”, group:3} ]; If they are seperate, then its work, but when they […]

Search filter with regex stuck my search filter and It does work without refresh?

I am searching for patient through my search filter.It worked in simple case but when I search with sabir it stuck and after removing the searchText sabir It does not work.It doesn’t generate the request next time.How do I handle sabir in angular2. Thanks in advance Here is code snippet Url which does work and does not work? work “” Does not work “” I am using this function for handling the Url. ValidURL(str):boolean { […]

Filtering list items with ng-repeat from a selection/de-selection of a combination of checkboxes

I have a list of items which are frequently updated, based on changes to a price property. If the price of an item falls below a certain value (below 5) that item has a ‘selected’ property set to true and displayed in the results table (filtered on the selected property). ng-repeat=”item in dataPrices | filter: {selected:true}” I want to add a series of checkboxes which, based on the selection/de-selection of a combination of checkboxes used […]

Filter table after click data AngularJS

I need to filter table – after click name in the list: <ul ng-repeat=”f in filter”> <li ng-model=””> <a class=”left-menu-link”> {{f}} </a> </li> </ul> The table should list only that name which I chose. My plunker: // Code goes here var app = angular.module(‘app’, []); app.controller(‘FirstCtrl’, function($scope) { $ = [{ “name”: “afdfg Nixon”, “system”: “System Architect” }, { “name”: “sdfasdfas”, “system”: “System Architect” }, { “name”: “ggg Nigadfgxon”, “system”: “System Architect” }, { […]