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
0
votes
1 answer

How to apply Angular2 pipes to dynamic content?

I need to apply a Pipe (transformation) to format dynamic content provided via an API. The data is actually being applied via a custom formatter that essentially binds to [innerHTML] on an element. The problem is the pipe I append does not apply,…
Jon Miles
  • 9,605
  • 11
  • 46
  • 66
0
votes
3 answers

angular2 pipe not working - no errors

I have a service that returns a list of pages. Now I want to write a pipe named pagesFilter that returns a list of pages that has this key set as true. Then I want to apply this filter when clicking on a navigation item. Somehow I can't get it to…
Miha Šušteršič
  • 9,742
  • 25
  • 92
  • 163
-1
votes
1 answer

Check if a date is within 30 days with Angular-cli pipes

How can I bring all the Events that begin inside this day to 30 days? I'd done this pipe but it doesn't work there is an array of events and needs to bring only the events that have dateStart inside 30 days from now, how can I do it work? the…
-1
votes
1 answer

How to allow only alphabets as a first character in input using angular 2 pipe

I used a concept of taking a length of the input field and restrict the numbers and symbols as a first character but it doesn't work out. Can some one help me by using pipe concept to allow only a alphabet as a first character. Thanks in advance
Naresh
  • 1
  • 1
-1
votes
1 answer

Why all Directives and Pipes must be in module's declarations?

Any directives and pipes must be in module's declarations. Why can't they be added to component level and instead always have to be at module level? Why angular team has put this restriction?
Jyoti Prasad Pal
  • 1,569
  • 3
  • 26
  • 41
-1
votes
2 answers

How to create pipe to filter list in Angular2

I'm facing problem with creating the pipe to filter list from input. What I would like to have is something like this: http://www.w3schools.com/howto/howto_js_filter_lists.asp Is there anybody who can help me with creating pipe for this? Update, I…
agims7
  • 216
  • 2
  • 6
  • 16
-1
votes
2 answers

angular2 default date pipe , number pipe and currency pipe not working with null values

I have date and amount fields that can be null in form submission. When I display these fields in details page with date and amount(0.00) using filters it throws Invalid argument '0000-00-00 00:00:00' for pipe 'DatePipe' and Invalid argument…
1 2 3
12
13