How do I pass the current variable in an ngFor loop to ngIf, if it is using templates with then/else syntax?
It appears that they pass through fine when used inline,
All you need is to use [ngTemplateOutletContext] Read More
[ngTemplateOutletContext]
Here is the way how you can achieve that :
All Templates Odd: {{number}} Even: {{number}}
WORKING DEMO