Skip to content

Commit 153cee1

Browse files
Tim Blasimhevery
authored andcommitted
feat(di): Modify hello_world to use @Injectable
Mark `GreetingService` as available to `Injector`s. Closes angular#986
1 parent 57723e1 commit 153cee1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/examples/src/hello_world/index_common.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {bootstrap, Component, Decorator, Template, NgElement} from 'angular2/angular2';
2+
import {Injectable} from 'angular2/di';
23

34
// Angular 2.0 supports 3 basic types of directives:
45
// - Component - the basic building blocks of Angular 2.0 apps. Backed by
@@ -52,7 +53,8 @@ class RedDec {
5253
}
5354
}
5455

55-
// A service used by the HelloCmp component.
56+
// A service available to the Injector, used by the HelloCmp component.
57+
@Injectable()
5658
class GreetingService {
5759
greeting:string;
5860
constructor() {

0 commit comments

Comments
 (0)