8000 Feature: Variable for intermediate ngFor Pipe result · Issue #8672 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

Feature: Variable for intermediate ngFor Pipe result #8672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dominique-mueller opened this issue May 16, 2016 · 3 comments
Closed

Feature: Variable for intermediate ngFor Pipe result #8672

dominique-mueller opened this issue May 16, 2016 · 3 comments

Comments

@dominique-mueller
Copy link

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.

@zoechi
Copy link
Contributor
zoechi commented May 23, 2016

Looks like a dup of #2451

@pkozlowski-opensource
Copy link
Member

It is indeed duplicate of #2451, thnx @zoechi

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0