Skip to content

evenfrost/babel-plugin-ng-annotate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-ng-annotate - babel 6.x

How to install

$ npm install --save-dev babel-plugin-ng-annotate

Note: this library depends on the syntax decorators plugin for parsing. Simply $ npm install --save-dev babel-plugin-syntax-decorators and follow the setup instructions below.

How to setup

.babelrc

{
  "presets": ["es2015"],
  "plugins": ["syntax-decorators", "ng-annotate"]
}

How to use

@Inject('service1', 'service2', 'service3')
class MyController {

    constructor() {
        this.service1();
    }

    method() {
        this.service2();
    }

    anotherMethod() {
        this.service3();
    }
}

angular.controller('MyController', MyController);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%