Angular指令2
scope Create a new scope for this directive rather than inheriting the parent scope.
controller Create a controller which publishes an API for communicating across directives.
require Require that another directive be present for this directive to function correctly.
link Programmatically modify resulting DOM element instances, add event listeners, and set up data binding.
compile Programmatically modify the DOM template for features across copies of a directive, as when used in ng-repeat.
Y our compile function can also return link functions to modify the resulting element instances