feat(di): Modify hello_world to use @Injectable

Mark `GreetingService` as available to `Injector`s.

Closes #986
This commit is contained in:
Tim Blasi 2015-03-16 14:45:47 -07:00 committed by Misko Hevery
parent 57723e1354
commit 153cee1244
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import {bootstrap, Component, Decorator, Template, NgElement} from 'angular2/angular2';
import {Injectable} from 'angular2/di';
// Angular 2.0 supports 3 basic types of directives:
// - Component - the basic building blocks of Angular 2.0 apps. Backed by
@ -52,7 +53,8 @@ class RedDec {
}
}
// A service used by the HelloCmp component.
// A service available to the Injector, used by the HelloCmp component.
@Injectable()
class GreetingService {
greeting:string;
constructor() {