diff --git a/modules/angular2/di.js b/modules/angular2/di.js index f98c12fc4b..f54eb8cace 100644 --- a/modules/angular2/di.js +++ b/modules/angular2/di.js @@ -1,4 +1,4 @@ -export {Inject, InjectPromise, InjectLazy, Optional, DependencyAnnotation} from './src/di/annotations'; +export {Inject, InjectPromise, InjectLazy, Injectable, Optional, DependencyAnnotation} from './src/di/annotations'; export {Injector} from './src/di/injector'; export {Binding, Dependency, bind} from './src/di/binding'; export {Key, KeyRegistry} from './src/di/key'; diff --git a/modules/angular2/src/di/annotations.js b/modules/angular2/src/di/annotations.js index 425b3991bb..d2197918bd 100644 --- a/modules/angular2/src/di/annotations.js +++ b/modules/angular2/src/di/annotations.js @@ -107,4 +107,23 @@ export class DependencyAnnotation { @CONST() constructor() { } -} \ No newline at end of file +} + +/** + * A class annotation that marks a class as available to `Injector`s for + * creation. + * + * ``` + * class NeedsService { + * constructor(svc:UsefulService) {} + * } + * + * @Injectable + * class UsefulService {} + * ``` + */ +export class Injectable { + @CONST() + constructor() { + } +}