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

Commit

Permalink
docs(directives): Edit for dartstyle and clarity.
Browse files Browse the repository at this point in the history
Closes #1037
  • Loading branch information
naomiblack committed May 16, 2014
1 parent d78b3da commit 8daef71
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lib/directive/ng_base_css.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
part of angular.directive;
/**
* Specifies a base CSS to use for components defined under the directive. `Selector:[ng-base-css]`
* Specifies a base CSS to use for components defined under the directive. `Selector: [ng-base-css]`
*
* The NgBaseCss directive is typically used at the top of an Angular application, so that everything in the
* application inherits the specified stylesheet.
Expand Down
4 changes: 2 additions & 2 deletions lib/directive/ng_bind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ part of angular.directive;

/**
* Replaces the text content of the specified HTML element with the value of a given expression,
* and updates the text content when the value of that expression changes. `Selector:[ng-bind]`
* and updates the text content when the value of that expression changes. `Selector: [ng-bind]`
*
* Typically, you don't use ngBind directly, but instead you use the double
* curly markup `{{ expression }}` which is similar but less verbose.
Expand All @@ -12,7 +12,7 @@ part of angular.directive;
* bindings from showing by using `ng-bind` instead of `{{ }}`. Since `ng-bind` is an element attribute, nothing is
* shown to the user.
*
* An alternative solution to this problem would be using the [ngCloak] directive.
* An alternative solution to this problem would be using the [NgCloak] directive.
*/
@Decorator(
selector: '[ng-bind]',
Expand Down
2 changes: 1 addition & 1 deletion lib/directive/ng_bind_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ part of angular.directive;

/**
* Sanitizes an HTML string and invokes the browser's parser to insert the string into
* the containing element in the DOM. `Selector:[ng-bind-html]`
* the containing element in the DOM. `Selector: [ng-bind-html]`
*
* # Example
*
Expand Down
2 changes: 1 addition & 1 deletion lib/directive/ng_bind_template.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
part of angular.directive;

/**
* Replaces the text content of an element with an interpolated template. `Selector:[ng-bind-template]`
* Replaces the text content of an element with an interpolated template. `Selector: [ng-bind-template]`
*
* # Example
*
Expand Down
2 changes: 1 addition & 1 deletion lib/directive/ng_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ part of angular.directive;

/**
* The `ngClass` directive allows you to dynamically style an HTML element,
* by binding to an expression that represents the classes to be bound.
* by binding to an expression that represents the classes to be bound. `Selector: [ng-class]`
*
* Classes are specified by a bound model that can be a string, array, or map:
*
Expand Down
34 changes: 21 additions & 13 deletions lib/directive/ng_cloak.dart
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
part of angular.directive;

/**
* The `ngCloak` directive is used to prevent the Angular html template from
* being briefly displayed by the browser in its raw (uncompiled) form while
* your application is loading. Use this directive to avoid the undesirable
* flicker effect caused by the html template display.
* Hides elements on the page while the application loads. `Selector: [ng-cloak], .ng-cloak`
*
* The directive can be applied to the `<body>` element, but typically a
* fine-grained application is preferred in order to benefit from progressive
* rendering of the browser view.
* This prevents template artifacts from being briefly displayed by the browser in their raw (uncompiled) form while
* your application is loading. Use this directive to avoid the undesirable flicker effect caused by the HTML template
* display.
*
* `ngCloak` works in cooperation with a css. Following is the css rule:
* The directive can be applied to the `<body>` element, but typically a fine-grained application is preferred in order
* to benefit from progressive rendering of the browser view.
*
* `ng-cloak` works in conjunction with a css rule:
*
* [ng-cloak], [data-ng-cloak], .ng-cloak {
* display: none !important;
* }
*
* When this css rule is loaded by the browser, all html elements (including
* their children) that are tagged with the `ng-cloak` directive are hidden.
* When Angular comes across this directive during the compilation of the
* template it deletes the `ngCloak` element attribute, which makes the compiled
* element visible.
* When this css rule is loaded by the browser, all elements (including their children) that are tagged with `ng-cloak`
* are hidden. When Angular encounters this directive during the compilation of the template, it deletes the `ng-cloak`
* element attribute, making the compiled element visible.
*
* # Examples
* NgCloak can be used as an attribute:
*
* <div ng-cloak>
*
* Or as a class name:
*
* <div class="myclass ng-cloak">
*
*/
@Decorator(selector: '[ng-cloak]')
@Decorator(selector: '.ng-cloak')
Expand Down
12 changes: 6 additions & 6 deletions lib/directive/ng_control.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
part of angular.directive;

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

String get name => _name;
void set name(value) {
void set name(String value) {
_name = value;
}

Expand Down

0 comments on commit 8daef71

Please sign in to comment.