Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: third_party/pkg/angular/lib/bootstrap.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of angular; 1 part of angular;
2 2
3 /** 3 /**
4 * This is the top level module which describes the whole of angular. 4 * This is the top level module which describes the whole of angular.
5 * 5 *
6 * The Module is made up or 6 * The Module is made up of
7 * 7 *
8 * - [NgCoreModule] 8 * - [NgCoreModule]
9 * - [NgCoreDomModule] 9 * - [NgCoreDomModule]
10 * - [NgDirectiveModule]
10 * - [NgFilterModule] 11 * - [NgFilterModule]
11 * - [NgPerfModule] 12 * - [NgPerfModule]
13 * - [NgRoutingModule]
12 */ 14 */
13 class AngularModule extends Module { 15 class AngularModule extends Module {
14 AngularModule() { 16 AngularModule() {
15 install(new NgCoreModule()); 17 install(new NgCoreModule());
16 install(new NgCoreDomModule()); 18 install(new NgCoreDomModule());
17 install(new NgDirectiveModule()); 19 install(new NgDirectiveModule());
18 install(new NgFilterModule()); 20 install(new NgFilterModule());
19 install(new NgPerfModule()); 21 install(new NgPerfModule());
20 install(new NgRoutingModule()); 22 install(new NgRoutingModule());
21 23
(...skipping 12 matching lines...) Expand all
34 * 36 *
35 * 1. Locating the root element of the application, 37 * 1. Locating the root element of the application,
36 * 2. Creating Angular [NgZone] 38 * 2. Creating Angular [NgZone]
37 * 3. Inside the [NgZone] create an injector 39 * 3. Inside the [NgZone] create an injector
38 * 4. Retrieve the [Compiler] and compile the root eleement 40 * 4. Retrieve the [Compiler] and compile the root eleement
39 * 41 *
40 * 42 *
41 * # Parameters: 43 * # Parameters:
42 * 44 *
43 * - [module] Option application module to add to the [Injector]. 45 * - [module] Option application module to add to the [Injector].
44 * - [modules] Optional list of [Module]s to add to the [Injector] (if more th en one is needed). 46 * - [modules] Optional list of [Module]s to add to the [Injector] (if more th an one is needed).
45 * - [element] Optional root element of the application. If non specified, the 47 * - [element] Optional root element of the application. If non specified, the
46 * the root element is looked up usinge the [selector]. If selector can not 48 * the root element is looked up using the [selector]. If selector can not
47 * identify a root, the root [HTTML] element is used for bootstraping. 49 * identify a root, the root [HTTML] element is used for bootstraping.
48 * - [selector] Optional CSS selector used to locate the root element for the application. 50 * - [selector] Optional CSS selector used to locate the root element for the application.
49 * - [injectorFactor] Optinoal factory responsible for creating the injector. 51 * - [injectorFactor] Optional factory responsible for creating the injector.
50 * 52 *
51 * 53 *
52 * 54 *
53 * # A typical way to boostrap an Angular application: 55 * # A typical way to boostrap an Angular application:
54 * 56 *
55 * Module myAppModule = new Module(); 57 * Module myAppModule = new Module();
56 * myAppModule.type(MyType); 58 * myAppModule.type(MyType);
57 * .... 59 * ....
58 * Injector injector = ngBootstrap(module: myAppModule); 60 * Injector injector = ngBootstrap(module: myAppModule);
59 */ 61 */
(...skipping 19 matching lines...) Expand all
79 NgZone zone = new NgZone(); 81 NgZone zone = new NgZone();
80 ngModules.add(new Module()..value(NgZone, zone)); 82 ngModules.add(new Module()..value(NgZone, zone));
81 83
82 return zone.run(() { 84 return zone.run(() {
83 var rootElements = [element]; 85 var rootElements = [element];
84 Injector injector = injectorFactory(ngModules); 86 Injector injector = injectorFactory(ngModules);
85 injector.get(Compiler)(rootElements)(injector, rootElements); 87 injector.get(Compiler)(rootElements)(injector, rootElements);
86 return injector; 88 return injector;
87 }); 89 });
88 } 90 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/angular.dart ('k') | third_party/pkg/angular/lib/core/directive.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698