Wrote a post about AngularJS directives.