pangloss/clang

Filters

pharcosyle opened this issue · 2 comments

Filters don't seem to work with clojure data, neither in clang-repeat (where things is a clojure vector)

clang-repeat="thing in things | orderBy:sort"

nor in the controller

(($filter "orderBy") things "propName"

You don't need filters. Just use thing in (sort things)

I'm unable to provide a custom function to sort. For example, thing in (sort (fn [a b] 0) things) gives me this error:

TypeError: undefined is not a function
    at http://localhost:5000/app.js:7014:17
    at stableCompareFn (http://localhost:5000/app.js:1458:12)
    at Array.sort (native)
...