-
Notifications
You must be signed in to change notification settings - Fork 248
Angular transformer and 'orderBy' filter #1023
Comments
Thanks for reporting. That's probably an issue with any filter args. |
@ntherneau What happens if you try using
|
@markovuksanovic Same result, |
I had a similar problem with ng-style #993 |
@MiguelAngelLV Thanks for the ref. Closing this one (duplicate). The issue seems to be that the transformer do not extract expression in filter args. |
OOps re-opening, that's two different issues:
The fixes should probably be somewhere around https://github.com/angular/angular.dart/blob/master/lib/tools/html_extractor.dart#L36 |
The problem still exists with v0.14, to solve it I've modified my code to this: <span ng-repeat="page in ctrl.pages | orderBy: 'rank'">
<!-- ... -->
</span> @Component(
selector: 'pages',
publishAs: 'ctrl',
templateUrl: '...',
exportExpressions: const ['rank'] // <=====
)
class PagesComponent {
// ...
} Source of this tip: #1307 |
Just got bitten by this bug. Any updates? Seems like a pretty serious bug to have made it into 1.0. |
When can you repair this problem, please? |
I'm running into problems when I try to use a field in the 'orderBy' filter that isn't displayed on the page. Works fine in Dartium but not after going through dart2js and the angular transformer (tested both 0.10.0 and 0.11.0). I created a minimal example to demonstrate what I'm running into:
pubspec.yaml
test.html
test.dart
When I try to run this as a JS build I get the following error and stack trace:
It works if I put the 'sortOrder' field somewhere on the page (and rebuild). eg
The text was updated successfully, but these errors were encountered: