Apparently, Angular 2 will use pipes instead of filters as in Angular1 in conjunction with ng-for to filter results, although the implementation still seems to be vague, wit
I know its an old question, however, I thought it might be helpful to offer another solution.
equivalent of AngularJS of this
in Angular 2+ you cant use *ngFor and *ngIf on a same element, so it will be following:
and if you can not use as internal container use ng-container instead. ng-container is useful when you want to conditionally append a group of elements (ie using *ngIf="foo") in your application but don't want to wrap them with another element.