Skip to content

Alternative declaration support #190

Closed
@dctdevelop

Description

@dctdevelop

Hey Guys,

I was noticing that there are hackish ways of implementing ng-annotate in compile-to-js languages, such as coffescript (i.e decalring a null statement)

While I believe that this is coffee-script's fault for not adding the comment on the declaration, I thought of a possible solution.

Is it possible to simply declare the $inject (as null, undefined, etc) property on the object we want annotated?

module.exports = ($scope)->
  $scope.foo = "foo"
  return

module.exports.$inject = null # [], undefined, etc. (falsey value for ng-annotate to populate)

ng-anotate would populate the field on this line. Based on the object in question.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions