Questions tagged [angular2-pipe]

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

An Angular 2 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 2 introduced a similar concept, now called pipe.

187 questions
1
vote
3 answers

How to transform date with angular 2?

i want to transform the date coming from the server in this format to this format ('yyyy-mm-dd hh-mm-ss')
o.O
  • 155
  • 5
  • 16
1
vote
1 answer

Angular 4 / Angular-cli: Date Polyfill with Internationalization API does not work

I can not seem to get the polyfill of the Internationalization API to work. As stated in the docs (https://angular.io/docs/ts/latest/guide/pipes.html) one simply needs to add a script to your index.html:
BigPenguin
  • 264
  • 2
  • 17
1
vote
0 answers

Using a pipe to filter an array of objects by an array of strings in Angular2

I am attempting to filter an array of objects which have a similar structure to this: posts = [ { title: 'post 1 title', location: 'Location 1' }, { title: 'post 2 title', location: 'Location 2' }, { title: 'post 3 title', location:…
aleks
  • 67
  • 2
  • 10
1
vote
1 answer

Angular 2 - Date pipe exception: Expression has changed after it was checked

I am using the DatePipe inside my component to transform timestamp into readable expression. But once the document is loaded i get the exception: EXCEPTION: Error in http://localhost:3000/app/interest/user-interest.component.html:15:15 caused by:…
1
vote
1 answer

Custom Pipe product filter?

So what I'm trying to achieve is being able to toggle multiple filters on an NgFor with it updating each time a filter is toggled on or off. I have this pipe: import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name:…
1
vote
1 answer

Angular 2 Table Search Pipe Filter not working

I am creating a table component in Angular 2, in which I am creating a common table search filter pipe, it is working correctly but not displaying the values in their appropriate columns. When I start typing the search keys in the text box the…
balajivaishnav
  • 2,795
  • 4
  • 23
  • 38
1
vote
0 answers

Is it possible to use *ngFor to populate multiple parent elements?

I want to use a div as a container. Within that container I'd like to populate up to 3 elements with *ngFor or *ngRepeat. After that limit is reached I'd like a new instance of the parent div to be generated to continue populating the data. So far…
Optiq
  • 2,835
  • 4
  • 33
  • 68
1
vote
2 answers

Bind component variable to pipe filter

i have a problem when passing values to my pipe filter. I need to pass an argument value in the form of a variable called pagex from my component and I cant find the syntax to make it work... or I'm missing something. Thanks for the…
Battalgazi
  • 367
  • 1
  • 4
  • 20
1
vote
1 answer

Pipe Filter Getting Called but the filtered value is not Passed back to component

I have created a Custom Pipe for my Drop Down But the filtered values dosent seem to get passed to the component there is also no error in the console . My Component - template