angular/angular.js — pull request #8839 by thorn0 (2014-08-29 17:04:50+00:00)
Title: feat($compile): inject directive name to directive controller

Most often this might be useful for sharing controller code between directives, in particular for accessing the value of the directive's 'main' attribute: `$attrs[$name]`

For example, see [this SO question](http://stackoverflow.com/q/19230264/76173).