filipkis / endev

The simplest way to work with data
MIT License
11 stars 2 forks source link

How can we extract the Endev annotations? #6

Open macaullyjames opened 9 years ago

macaullyjames commented 9 years ago

The annotations are a really cool add-on to Endev, but at the moment the logic behind them is spread out across a few directives (from, list and object). It would be nice if we could put all annotation related stuff in a separate module; not just for reduced code clutter, but also because it would be easier to include/exclude the annotation functionality.

The problem is, I'm not sure what the best way to expose the query is. One method could be to add an attribute to the relevant DOM nodes, something like data-query="FROM geo.places gp WHERE gp.text = query", and then let the annotations module listen for changes to those attributes. I'm not sure that that's even possible in Angular, and it's quite possible that there's a better way of doing it.

Any suggestions? :)