> I think the link function does not have to return the element in angularjs

The link function returned by the $compile function does return the element. See http://code.angularjs.org/1.2.0rc1/docs/api/ng.$compile.

But, if no `cloneAttachFn` is passed to the link function then the returned element is the original element. This is explicit in the $compile documentation.

So the current code is correct, though I would have written it as follows:

```
var element = angular.element(...);
this.element = $compile(element)(this.scope);
```

because it makes more sense to me, but this is minor.