Questions tagged [angular-pipe]

Use for discussion of Angular 2+ pipes

An Angular pipe takes in data as input and transforms it to a desired output.

The first version of AngularJS, used the concept of filters to format the value of an expression for display to the user.

Angular (version 2 and on) introduced a similar concept, now called pipe.

671 questions
-1
votes
1 answer

Manipulate Html table with Angular

very simple what is the equivalent of this jQuery code $('#message tr').eq(index).addClass('negative') in angular, or how can i achieve the same result with angular can't use [class.bind] the above job should be done in by clicking the button. the…
Mohammad
  • 71
  • 1
  • 10
-1
votes
1 answer

Unknown Pipe in Angular

In the indice page, I would like to format the number to two decimal in the cours column. Example: 11345.654589 to 11345.65. I created a format-num.pipe folder in shared/pipes. pipes.module.ts import { NgModule } from '@angular/core'; import {…
solange
  • 103
  • 1
  • 1
  • 6
-1
votes
1 answer

How to write json pie angular get properties?

I have a typescript class in my angular project. export class CheckoutInfo { lines: CheckoutInfoLine[]; taxRate: number; get subTotal(): number { return this.lines.reduce((acc: number, cur: CheckoutInfoLine) => acc + cur.total,…
barteloma
  • 6,403
  • 14
  • 79
  • 173
-1
votes
2 answers

Shortening number in angular

I am working on an angular app. I have few number which I need to display. Those numbers can be like 1234567.87876868. While displaying this number I need to show in format like 12.9k and my code to make number in this form is import { Pipe,…
julie
  • 35
  • 6
-1
votes
1 answer

How to return total count and including records while using Search Pipe in angular?

I am implementing search functionality using angular pipe, my requirement is to return the search results i.e array of objects and total count i.e total number of search results. I tried returning multiple paramters I am getting count number but it…
divya dave
  • 471
  • 1
  • 9
  • 28
-1
votes
1 answer

Angular 7 - Trouble with angular-ng-autocomplete when trying to build

I spent a loft of hours try to build an angular app because I have a trouble with angular-ng-autocomplete. The problem is with pipe "highlight": Template parse errors: The pipe highlight could not be found. I tried to fix with some alternatives but…
-1
votes
1 answer

Angular 8.1.2 - Filter nested objects

I have a need for a similar filter logic as the fiddler on this post Older post, but for a newer version of Angular. The Fiddler example on this older post, seems to work exactly how I would like mine to work with the nested JSON objects (4 levels…
Craig Mayers
  • 185
  • 2
  • 9
-1
votes
1 answer

Show two decimal places if decimal part is greater than 0 in angular 7

I am working on an Angular 7 application. How to format the numbers as below: 2.14569 to 2.14 3.245 to 3.24 1.00 to 1 How can i achieve this in Angular. I have tried (| number:'1.2-2') this but it always give two decimal places like 4.00 but i want…
Waleed Naveed
  • 2,293
  • 2
  • 29
  • 57
-1
votes
1 answer

Angular 6 PipeTransform on Input Jumps Carat to Left on IE11

I have a custom Angular pipe that transforms entered text into a series of dots after the user leaves the input field. When the user re-enters the input field, the text should transform back into the entered data, with the carat appearing at the end…
Griffin
  • 710
  • 2
  • 15
  • 29
-1
votes
4 answers

Pipe through large list

So I have a list of 2000+ employees and I need to filter through them. As I currently have it, it goes super slow and lags for 2 seconds. Everytime I type in a letter, it passes that list each time. Any way to midigate the lag? Update This is some…
Joel Cruz
  • 27
  • 1
  • 10
-1
votes
1 answer

How can I call a pipe with in a service in angular4?

I want to call a pipe with in a service. just like export class MyService{ constructor(private http: Http){} getValues(){ this.http.get(baseUrl).pipe(//pipename) //I want to menton my custom pipe } } After completion of pipe I want to…
-1
votes
1 answer

Pipe is not working

My pipe file is looking like this: pipe.ts import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'unique', pure: false }) export class UniquePipe implements PipeTransform { transform(value: any, args?: any): any { //…
linto johny
  • 137
  • 1
  • 2
  • 9
-1
votes
1 answer

how to show no data found in grid table uisng angular 4?

Hi i am using angular 4 and i need to show no data found while i searching grid table search box,its not showing,how to show????? pipe.ts: import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'category' }) export class CategoryPipe…
Ajith Deivam
  • 736
  • 4
  • 11
  • 27
-1
votes
1 answer

Customer filter pipe - Angular2

In the below component view,

Topic listing

-1
votes
1 answer

Unconventional behavior with json array and an upppercase pipe filter for a number

Updated question: An uppercase pipe filter for a number would not make any sense, but that itself has bought this question to live, so posting If I have an array of JSON objects as below export class ProductListComponent { show: Boolean = true; …
ismail baig
  • 861
  • 2
  • 11
  • 39
1 2 3
44
45