Angular 1.3 stateless filter caching doesn't work with nightly


Angular 1.3 has a great feature where they cache the result of a stateless filter. Works perfectly as you can see on the attached jsbin. But somehow it doesn’t work in ionic. See the attached codepen.

Without Ionic: When button is clicked, filters are not recalculated and therefore no console log is printet
With Ionic: When button is clicked, filters are recalculated as you can see in console log

Expected (see console log):

Ionic (see console log):

When I update your codepen to use the nightly builds from the cdn // the filter doesn’t recalculate every time and add more console logs. Is this what you mean? Thanks

Hi Adam

Thank you. It works with the nightly.

It still didn’t work on my local repo thought and it took me ages to find out why. The reason is batarang.

When you open the jsbin above in preview mode (you have to clone first since the free time is expired) with chrome, open the console you’ll see it works as supposed.

When you then enable batarang it doesn’t work anymore. Couldn’t yet figure out why.


There is already an open issue: