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

Commit 8daef71

Browse files
committed
docs(directives): Edit for dartstyle and clarity.
Closes #1037
1 parent d78b3da commit 8daef71

7 files changed

+33
-25
lines changed

lib/directive/ng_base_css.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
part of angular.directive;
22
/**
3-
* Specifies a base CSS to use for components defined under the directive. `Selector:[ng-base-css]`
3+
* Specifies a base CSS to use for components defined under the directive. `Selector: [ng-base-css]`
44
*
55
* The NgBaseCss directive is typically used at the top of an Angular application, so that everything in the
66
* application inherits the specified stylesheet.

lib/directive/ng_bind.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ part of angular.directive;
22

33
/**
44
* Replaces the text content of the specified HTML element with the value of a given expression,
5-
* and updates the text content when the value of that expression changes. `Selector:[ng-bind]`
5+
* and updates the text content when the value of that expression changes. `Selector: [ng-bind]`
66
*
77
* Typically, you don't use ngBind directly, but instead you use the double
88
* curly markup `{{ expression }}` which is similar but less verbose.
@@ -12,7 +12,7 @@ part of angular.directive;
1212
* bindings from showing by using `ng-bind` instead of `{{ }}`. Since `ng-bind` is an element attribute, nothing is
1313
* shown to the user.
1414
*
15-
* An alternative solution to this problem would be using the [ngCloak] directive.
15+
* An alternative solution to this problem would be using the [NgCloak] directive.
1616
*/
1717
@Decorator(
1818
selector: '[ng-bind]',

lib/directive/ng_bind_html.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ part of angular.directive;
22

33
/**
44
* Sanitizes an HTML string and invokes the browser's parser to insert the string into
5-
* the containing element in the DOM. `Selector:[ng-bind-html]`
5+
* the containing element in the DOM. `Selector: [ng-bind-html]`
66
*
77
* # Example
88
*

lib/directive/ng_bind_template.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
part of angular.directive;
22

33
/**
4-
* Replaces the text content of an element with an interpolated template. `Selector:[ng-bind-template]`
4+
* Replaces the text content of an element with an interpolated template. `Selector: [ng-bind-template]`
55
*
66
* # Example
77
*

lib/directive/ng_class.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ part of angular.directive;
22

33
/**
44
* The `ngClass` directive allows you to dynamically style an HTML element,
5-
* by binding to an expression that represents the classes to be bound.
5+
* by binding to an expression that represents the classes to be bound. `Selector: [ng-class]`
66
*
77
* Classes are specified by a bound model that can be a string, array, or map:
88
*

lib/directive/ng_cloak.dart

+21-13
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
part of angular.directive;
22

33
/**
4-
* The `ngCloak` directive is used to prevent the Angular html template from
5-
* being briefly displayed by the browser in its raw (uncompiled) form while
6-
* your application is loading. Use this directive to avoid the undesirable
7-
* flicker effect caused by the html template display.
4+
* Hides elements on the page while the application loads. `Selector: [ng-cloak], .ng-cloak`
85
*
9-
* The directive can be applied to the `<body>` element, but typically a
10-
* fine-grained application is preferred in order to benefit from progressive
11-
* rendering of the browser view.
6+
* This prevents template artifacts from being briefly displayed by the browser in their raw (uncompiled) form while
7+
* your application is loading. Use this directive to avoid the undesirable flicker effect caused by the HTML template
8+
* display.
129
*
13-
* `ngCloak` works in cooperation with a css. Following is the css rule:
10+
* The directive can be applied to the `<body>` element, but typically a fine-grained application is preferred in order
11+
* to benefit from progressive rendering of the browser view.
12+
*
13+
* `ng-cloak` works in conjunction with a css rule:
1414
*
1515
* [ng-cloak], [data-ng-cloak], .ng-cloak {
1616
* display: none !important;
1717
* }
1818
*
19-
* When this css rule is loaded by the browser, all html elements (including
20-
* their children) that are tagged with the `ng-cloak` directive are hidden.
21-
* When Angular comes across this directive during the compilation of the
22-
* template it deletes the `ngCloak` element attribute, which makes the compiled
23-
* element visible.
19+
* When this css rule is loaded by the browser, all elements (including their children) that are tagged with `ng-cloak`
20+
* are hidden. When Angular encounters this directive during the compilation of the template, it deletes the `ng-cloak`
21+
* element attribute, making the compiled element visible.
22+
*
23+
* # Examples
24+
* NgCloak can be used as an attribute:
25+
*
26+
* <div ng-cloak>
27+
*
28+
* Or as a class name:
29+
*
30+
* <div class="myclass ng-cloak">
31+
*
2432
*/
2533
@Decorator(selector: '[ng-cloak]')
2634
@Decorator(selector: '.ng-cloak')

lib/directive/ng_control.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
part of angular.directive;
22

33
/**
4-
* The NgControl class is a super-class for handling info and error states between
5-
* inner controls and models. NgControl will automatically apply the associated CSS
6-
* classes for the error and info states that are applied as well as status flags.
7-
* NgControl is used with the form and fieldset as well as all other directives that
8-
* are used for user input with NgModel.
4+
* Contains info and error states used during form and input validation.
5+
*
6+
* NgControl is a common superclass for forms and input controls that handles info and error states, as well as
7+
* status flags. NgControl is used with the form and fieldset as well as all other directives that are used for
8+
* user input with NgModel.
99
*/
1010
abstract class NgControl implements AttachAware, DetachAware {
1111
static const NG_VALID = "ng-valid";
@@ -93,7 +93,7 @@ abstract class NgControl implements AttachAware, DetachAware {
9393
bool get invalidSubmit => _submitValid == false;
9494

9595
String get name => _name;
96-
void set name(value) {
96+
void set name(String value) {
9797
_name = value;
9898
}
9999

0 commit comments

Comments
 (0)