Using ES6 arrow functions in AngularJS html templates

Viewed 3265

is there a posibility to use ES6 arrow functions directly in AngularJS html tamplates like this ?

<div ng-if="results.filter(e => e.ext == 'xml').length > 0">Text</div>

'result' is a list of objects with 'ext' as property. Until now I've used lodash and it works perfectly:

<div ng-if="_.filter(results, { ext : 'xml' }).length > 0">Text</div>

but will change to ES6 if possible...

Has anybody experience with that or some hints or maybe better ideas ?

2 Answers
Related