0

Is there a way to conditional process an observable data through a custom pipe in an ngIf

I can do something like

<div *ngIf="dataFields$ | async | customPipe as fields ">

However, I want to have a condition before using customPipe

<div *ngIf="dataFields$ | async | <condition> ? customPipe as fields">

I only have if condition, no else block needed. But, I cant figure out whether this functionality exists or not.

kaur
  • 567
  • 1
  • 7
  • 24
  • 1
    why not pass parameters into your pipe and do your conditions there? – Rogelio Dec 15 '20 at 04:40
  • Passing the condition to pipe at this point, but want the pipe to be cleaner and have condition outside of pipe – kaur Dec 15 '20 at 14:10

0 Answers0