-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Implement Query filters #3034
Comments
👍 |
Needs more design, as discussed passing every object through an opaque filter will prohibit further optimizations down the road. |
Discussed with Misko, we should tackle benchmarking query and performance improvements first before adding more general APIs. |
I just wanted to mention that this feature could be more important than it might look at first sight. There are a lot of common use cases that seem to need this feature, take for example a menu with sub-menus:
In this case I believe we need to have in the Or is there some other alternative way of implementing this with the current API? Thanks |
Let's not implement this just yet, as it may have negative perf improvement. Let's make sure that we have real use cases, which can not be implemented in other ways. |
fyi this issue was referenced on StackOverflow: http://stackoverflow.com/questions/32300168/how-to-get-a-reference-to-a-particular-component-in-an-angular2-template |
I think the latest thinking is now, as it would prevent compile time generation of the queries. Will close. /cc @tbosch |
@mhevery could you explain what you mean by that last comment? |
We will soon calculate the queries already during compilation. We could add a filter function that we just call on the query result, but On Fri, Jan 29, 2016 at 10:20 AM Brandon Duffany notifications@github.com
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
To support more flexible queries implement an option to pass filter to Query. For example:
@Query(MyFeature.filter) list: QueryList<dynamic>
wherestatic filter(obj) => obj is Foo || obj is Bar.
see discussion on #1935 for more info.
The text was updated successfully, but these errors were encountered: