bensmithett/viewloader — pull request #1 by makenosound (2014-04-25 12:13:50+00:00)
Title: A rewrite! viewloader now matches on custom named data attributes.

Hey Ben,

Took a day or two longer than I’d hoped, but here’s that pull request :) It’s all in line with that gist, but you might want to test that things are working as expected.

Cheers,
Max

****

`data-view-thing` will match a setup function named `thing` in whatever object is passed to `viewloader.execute`. This has the added advantage of being able to pass data to the function through the attribute value, `

`, which will be passed as a third argument (props).