Skip to content

Instantly share code, notes, and snippets.

@vvakame
Created April 5, 2015 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvakame/29a0f26c9b64877354c6 to your computer and use it in GitHub Desktop.
Save vvakame/29a0f26c9b64877354c6 to your computer and use it in GitHub Desktop.
AngularJS(1.3)+TypeScript Decorators
/// <reference path="./typings/angularjs/angular.d.ts"/>
var testModule = angular.module("test", [])
let controller = (target: any) => {
testModule.controller(target.name, target);
};
@controller
class TestController {
get hello() {
return "Hello, world!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment