You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Angular 1 it was possible to store the intermediate result of a filtered ngFor. Since v1.3 beta17 it's even easier by using an alias expression. See the docs here: https://code.angularjs.org/1.3.0-beta.17/docs/api/ng/directive/ngRepeat. But in Angular 2 this feature seems to be missing.
Use case as an example
My (example) use case: I'm using a pipe to filter a list of items depending on a search text. When the result list is empty, I want to be able to notify the user about this empty state, e.g. with a text "No search results." or similar. In addition, it would be nice to show the number of found search results at any time. In Angular 1, I was able to save the intermediate filter result in a variable and work with its length property to achieve this.
Will this feature be coming in Angualr 2 or should we better not use a Pipe in this case? Although I think a Pipe is the nicest solution here.
The text was updated successfully, but these errors were encountered:
Feature
In Angular 1 it was possible to store the intermediate result of a filtered ngFor. Since v1.3 beta17 it's even easier by using an alias expression. See the docs here: https://code.angularjs.org/1.3.0-beta.17/docs/api/ng/directive/ngRepeat. But in Angular 2 this feature seems to be missing.
Use case as an example
My (example) use case: I'm using a pipe to filter a list of items depending on a search text. When the result list is empty, I want to be able to notify the user about this empty state, e.g. with a text "No search results." or similar. In addition, it would be nice to show the number of found search results at any time. In Angular 1, I was able to save the intermediate filter result in a variable and work with its length property to achieve this.
Will this feature be coming in Angualr 2 or should we better not use a Pipe in this case? Although I think a Pipe is the nicest solution here.
The text was updated successfully, but these errors were encountered: