From 153cee124437586a31ef3d10c02cd98e9c98b33b Mon Sep 17 00:00:00 2001 From: Tim Blasi Date: Mon, 16 Mar 2015 14:45:47 -0700 Subject: [PATCH] feat(di): Modify hello_world to use @Injectable Mark `GreetingService` as available to `Injector`s. Closes #986 --- modules/examples/src/hello_world/index_common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/examples/src/hello_world/index_common.js b/modules/examples/src/hello_world/index_common.js index b02f461163..32f0b5b01f 100644 --- a/modules/examples/src/hello_world/index_common.js +++ b/modules/examples/src/hello_world/index_common.js @@ -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() {