Skip to content

Commit a35a93d

Browse files
Tim Blasikegluneq
authored andcommitted
chore(analytics): Include all of angular2 in hello_world
Import dependencies from `angular2/angular2.dart` in `hello_world` to ensure that any size regressions are caught by our checks. Update to avoid regressions like angular#5419. Closes angular#5394
1 parent 163164c commit a35a93d

1 file changed

Lines changed: 2 additions & 32 deletions

File tree

modules_dart/payload/hello_world/web/index.dart

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,25 @@
11
library hello_world.index;
22

33
import "package:angular2/bootstrap.dart" show bootstrap;
4-
import "package:angular2/core.dart"
5-
show ElementRef, Component, Directive, Injectable;
6-
import "package:angular2/render.dart" show Renderer;
4+
import "package:angular2/angular2.dart"
5+
show Component, Directive, ElementRef, Injectable, Renderer;
76

87
main() {
9-
// Bootstrapping only requires specifying a root component.
10-
11-
// The boundary between the Angular application and the rest of the page is
12-
13-
// the shadowDom of this root component.
14-
15-
// The selector of the component passed in is used to find where to insert the
16-
17-
// application.
18-
19-
// You can use the light dom of the <hello-app> tag as temporary content (for
20-
21-
// example 'Loading...') before the application is ready.
228
bootstrap(HelloCmp);
239
}
2410

25-
// A service available to the Injector, used by the HelloCmp component.
2611
@Injectable()
2712
class GreetingService {
2813
String greeting = "hello";
2914
}
30-
// Directives are light-weight. They don't allow new
3115

32-
// expression contexts (use @Component for those needs).
3316
@Directive(selector: "[red]")
3417
class RedDec {
35-
// ElementRef is always injectable and it wraps the element on which the
36-
37-
// directive was found by the compiler.
3818
RedDec(ElementRef el, Renderer renderer) {
3919
renderer.setElementStyle(el, "color", "red");
4020
}
4121
}
42-
// Angular 2.0 supports 2 basic types of directives:
43-
44-
// - Component - the basic building blocks of Angular 2.0 apps. Backed by
45-
46-
// ShadowDom.(http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/)
47-
48-
// - Directive - add behavior to existing elements.
49-
50-
// @Component is AtScript syntax to annotate the HelloCmp class as an Angular
5122

52-
// 2.0 component.
5323
@Component(
5424
selector: "hello-app",
5525
viewProviders: const [GreetingService],

0 commit comments

Comments
 (0)