Conversation
|
This requires some design that needs @mhevery. E.g. we can't use reflection in an ad hoc way as this won't work in Dart. |
|
So first I checked Angular.dart and filter/orderBy pipes are broken as far as static reflection analysis goes. Technically it is clear that as long as something like In practice though no bug is filed against angular.dart for this broken behavior and the reason could be that the getter is very likely to be generated for some other reason. For example if you're sorting a table this way, you most likely will display the sorted column or otherwise the data would look random.
That said at the core of this problem I would blame Dart's haphazard mirrors lib which makes it virtually unusable in production. If dart has to be compiled to js for production, simple reflection like accessing getters/setters should be just as easy as it is in javascript and while the performance would remain at same level as pure js, a few more kilobytes could be saved from final output. |
|
@mhevery What should we do with this pipe? Just support it in JS? |
|
Yes, JS only |
|
PR is updated. |
|
Let's not do this as part of angular core, as it won't work with the precompiled templates that we are about to do. Please feel free to publish this as a standalone directive. |
|
From the user perspective, if Is my understanding correct that ng2 will not include |
|
@tbosch Can you clarify your thoughts about not doing the orderby pipe in angular core. If this was done as a standalone pipe in common/pipes would that be acceptable? Also, @tbosch and @mhevery what are your thoughts on orderby implemented as a pure pipe? It seems that a non-pure orderby pipe would perform poorly, but a pure version could be confusing if a developer didn't understand that the pipe is pure. Would we need pure and non-pure versions of the pipe (appropriately named to self-document what they are -- orderByPure and orderByImpure) or just make it a pure pipe and let it be discovered how it is intended to be used? Thoughts? |
|
The issue with |
|
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. |
No description provided.