2017-03-15

I've tried to provide a convention, or standard, for communicating with a directive in Angular.

Basically the directive will have a "settings" object containing callbacks and initial data received from the controller, and an "api" object containing public functions.

I've created a service called "gabby" but it doesn't do much, just a convenience.

HTML

Parent Controller

Directive

Just Angular

Or with the Gabby Service

Directive's Controller

Just Angular

Or with the Gabby Service

More details:
https://github.com/yellowblood/gabby

Am I trying to solve an already solved problem?

Do you think this approach is readable and clear?

Show more