I have links that I want to make in different ways depending on the link. Therefore, I have a data structure:
var data = [{"name": "foo", "onClick": "baz ()"}, {"name": "bar", "onClick": "bam ()"}];
Currently in the view, I have a run function that takes an element and does eval (item.onClick), and it works, it just feels like a security hole. I could put onClick in html when rendering the view, but this seems to be wrong.
Does anyone know how to do this?
source share