Created
April 5, 2015 05:22
-
-
Save vvakame/29a0f26c9b64877354c6 to your computer and use it in GitHub Desktop.
AngularJS(1.3)+TypeScript Decorators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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