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

Unified Diff: third_party/pkg/angular/lib/bootstrap.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/lib/angular.dart ('k') | third_party/pkg/angular/lib/change_detection/ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/angular/lib/bootstrap.dart
===================================================================
--- third_party/pkg/angular/lib/bootstrap.dart (revision 33054)
+++ third_party/pkg/angular/lib/bootstrap.dart (working copy)
@@ -23,7 +23,6 @@
type(MetadataExtractor);
value(Expando, _elementExpando);
- value(NgApp, new NgApp(dom.window.document.documentElement));
}
}
@@ -47,7 +46,7 @@
* - [modules] Optional list of [Module]s to add to the [Injector] (if more than one is needed).
* - [element] Optional root element of the application. If non specified, the
* the root element is looked up using the [selector]. If selector can not
- * identify a root, the root [HTML] element is used for bootstraping.
+ * identify a root, the root [HTTML] element is used for bootstraping.
* - [selector] Optional CSS selector used to locate the root element for the application.
* - [injectorFactor] Optional factory responsible for creating the injector.
*
@@ -61,11 +60,11 @@
* Injector injector = ngBootstrap(module: myAppModule);
*/
Injector ngBootstrap({
- Module module: null,
- List<Module> modules: null,
- dom.Element element: null,
- String selector: '[ng-app]',
- Injector injectorFactory(List<Module> modules): _defaultInjectorFactory}) {
+ Module module: null,
+ List<Module> modules: null,
+ dom.Element element: null,
+ String selector: '[ng-app]',
+ Injector injectorFactory(List<Module> modules): _defaultInjectorFactory}) {
_publishToJavaScript();
var ngModules = [new AngularModule()];
@@ -74,29 +73,18 @@
if (element == null) {
element = dom.querySelector(selector);
var document = dom.window.document;
- if (element == null) {
- element = document.childNodes.firstWhere((e) => e is dom.Element);
- }
+ if (element == null) element = document.childNodes.firstWhere((e) => e is dom.Element);
}
// The injector must be created inside the zone, so we create the
// zone manually and give it back to the injector as a value.
NgZone zone = new NgZone();
- ngModules.add(new Module()
- ..value(NgZone, zone)
- ..value(NgApp, new NgApp(element)));
+ ngModules.add(new Module()..value(NgZone, zone));
return zone.run(() {
var rootElements = [element];
Injector injector = injectorFactory(ngModules);
- injector.get(Compiler)(rootElements, injector.get(DirectiveMap))
- (injector, rootElements);
+ injector.get(Compiler)(rootElements)(injector, rootElements);
return injector;
});
}
-
-/// Holds a reference to the root of the application used by ngBootstrap.
-class NgApp {
- final dom.Element root;
- NgApp(this.root);
-}
« no previous file with comments | « third_party/pkg/angular/lib/angular.dart ('k') | third_party/pkg/angular/lib/change_detection/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698