Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 2d8fc53

Browse files
pavelgjjbdeboer
authored andcommitted
chore(docs): fix dartdoc indentation for application_factory
1 parent b01fde2 commit 2d8fc53

File tree

3 files changed

+51
-53
lines changed

3 files changed

+51
-53
lines changed

lib/application.dart

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ import 'package:angular/introspection_js.dart';
8989
* You can use AngularModule explicitly when creating a custom Injector that needs to know
9090
* about Angular services, formatters, and directives. When writing tests, this is typically done for
9191
* you by the [SetUpInjector](#angular-mock@id_setUpInjector) method.
92-
*
93-
9492
*/
9593
class AngularModule extends Module {
9694
AngularModule() {
@@ -139,9 +137,9 @@ abstract class Application {
139137
final List<Module> modules = <Module>[];
140138
dom.Element element;
141139

142-
/**
143-
* Creates a selector for a DOM element.
144-
*/
140+
/**
141+
* Creates a selector for a DOM element.
142+
*/
145143
dom.Element selector(String selector) => element = _find(selector);
146144

147145
Application(): element = _find('[ng-app]', dom.window.document.documentElement) {
@@ -151,9 +149,9 @@ abstract class Application {
151149
..bind(dom.Node, toFactory: (i) => i.get(Application).element);
152150
}
153151

154-
/**
155-
* Returns the injector for this module.
156-
*/
152+
/**
153+
* Returns the injector for this module.
154+
*/
157155
Injector injector;
158156

159157
Application addModule(Module module) {
@@ -180,9 +178,9 @@ abstract class Application {
180178
});
181179
}
182180

183-
/**
184-
* Creates an injector function that can be used for retrieving services as well as for
185-
* dependency injection.
186-
*/
181+
/**
182+
* Creates an injector function that can be used for retrieving services as well as for
183+
* dependency injection.
184+
*/
187185
Injector createInjector();
188186
}

lib/application_factory.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,18 @@ class _DynamicApplication extends Application {
6767

6868
Injector createInjector() => new DynamicInjector(modules: modules);
6969
}
70+
7071
/**
71-
* Creates an `applicationFactory` that bootstraps Angular as part of the `main()` function.
72-
*
73-
* main() {
74-
* applicationFactory()
75-
* .addModule(new MyModule())
76-
* .run();
77-
* }
78-
*
79-
* During `pub build`, `applicationFactory()` is replaced by `staticApplication()` and
80-
* populated with the getters, setters, annotations, and factories generated by
81-
* Angular's transformers for dart2js compilation.
82-
*/
72+
* Creates an `applicationFactory` that bootstraps Angular as part of the `main()` function.
73+
*
74+
* main() {
75+
* applicationFactory()
76+
* .addModule(new MyModule())
77+
* .run();
78+
* }
79+
*
80+
* During `pub build`, `applicationFactory()` is replaced by `staticApplication()` and
81+
* populated with the getters, setters, annotations, and factories generated by
82+
* Angular's transformers for dart2js compilation.
83+
*/
8384
Application applicationFactory() => new _DynamicApplication();

lib/application_factory_static.dart

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@
2323
* .run();
2424
* }
2525
*
26-
* Note that you must explicitly import both
26+
* Note that you must explicitly import both
2727
* `angular.dart` and `application_factory_static.dart` at the start of your file. See [staticApplicationFactory]
2828
* (#angular-app-factory-static@id_staticApplicationFactory) for more on explicit definitions required with this
2929
* library.
30-
*
3130
*/
3231
library angular.app.factory.static;
3332

@@ -63,34 +62,34 @@ class _StaticApplication extends Application {
6362
Injector createInjector() =>
6463
new StaticInjector(modules: modules, typeFactories: typeFactories);
6564
}
65+
6666
/**
67-
*
68-
* Bootstraps Angular as part of the `main()` function.
69-
*
70-
* `staticApplication()` replaces `dynamicApplication()` in the main function during pub build,
71-
* and is populated with the getters, setters, annotations, and factories generated by
72-
* Angular's transformers for dart2js compilation. It is not typically called directly.
73-
*
74-
* For example,
75-
*
76-
* main() {
77-
* applicationFactory()
78-
* .addModule(new Module()..bind(HelloWorld))
79-
* .run();
80-
* }
81-
*
82-
* becomes:
83-
*
84-
* main() {
85-
* staticApplication(generated_static_injector.factories,
86-
* generated_static_metadata.typeAnnotations,
87-
* generated_static_expressions.getters,
88-
* generated_static_expressions.setters,
89-
* generated_static_expressions.symbols)
90-
* .addModule(new Module()..bind(HelloWorldController))
91-
* .run();
92-
*
93-
*/
67+
* Bootstraps Angular as part of the `main()` function.
68+
*
69+
* `staticApplication()` replaces `dynamicApplication()` in the main function during pub build,
70+
* and is populated with the getters, setters, annotations, and factories generated by
71+
* Angular's transformers for dart2js compilation. It is not typically called directly.
72+
*
73+
* For example,
74+
*
75+
* main() {
76+
* applicationFactory()
77+
* .addModule(new Module()..bind(HelloWorld))
78+
* .run();
79+
* }
80+
*
81+
* becomes:
82+
*
83+
* main() {
84+
* staticApplication(generated_static_injector.factories,
85+
* generated_static_metadata.typeAnnotations,
86+
* generated_static_expressions.getters,
87+
* generated_static_expressions.setters,
88+
* generated_static_expressions.symbols)
89+
* .addModule(new Module()..bind(HelloWorldController))
90+
* .run();
91+
*
92+
*/
9493
Application staticApplicationFactory(
9594
Map<Type, TypeFactory> typeFactories,
9695
Map<Type, Object> metadata,

0 commit comments

Comments
 (0)