Monday, 19 August 2013

AngularJS event chaining in directives

AngularJS event chaining in directives

I am building a filtering component using AngularJS that needs to be
scalable across many applications and data sets. I've built a directive
that uses data from a JSON object and builds out the appropriate tables --
simple.
Next, I need to build a filtering system which filters data across these
tables based on parent/child relationships and selections from the parent
table. Since each table is built from the same directive how should I use
angular best practices to accomplish this? How would I be able to kick off
a filtering event in a child directive instance once its parent is done
filtering, and still keep my code simple and scalable?
I've started reading up on directive controllers and
directive-to-directive communication but this seems to only apply to
directives that inherit methods from other directives (not instances of
the same directive).
Any help would be great!
Thanks, Austin

No comments:

Post a Comment