Added jsDoc comments to directives.js