library hello_world.index; import "package:angular2/platform/browser.dart" show AngularEntrypoint, bootstrap; import "package:angular2/angular2.dart" show Component, Directive, ElementRef, Injectable, Renderer; @AngularEntrypoint("Hello World Entrypoint") main() { bootstrap(HelloCmp); } @Injectable() class GreetingService { String greeting = "hello"; } @Directive(selector: "[red]") class RedDec { RedDec(ElementRef el, Renderer renderer) { renderer.setElementStyle(el.nativeElement, "color", "red"); } } @Component( selector: "hello-app", viewProviders: const [GreetingService], template: '''