Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1a2ed70

Browse files
Diego Plentzbtford
Diego Plentz
authored andcommitted
docs(guide/concepts): update example
The "A first example: Data binding" section it implies that the `required` directive is doing something, but it isn't. I just removed the parts the refer to the required directive to avoid confusion.
1 parent d0de0ce commit 1a2ed70

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

docs/content/guide/concepts.ngdoc

+4-7
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ Let's start with input fields for quantity and cost whose values are multiplied
3737
<div ng-app ng-init="qty=1;cost=2">
3838
<b>Invoice:</b>
3939
<div>
40-
Quantity: <input type="number" ng-model="qty" required >
40+
Quantity: <input type="number" ng-model="qty">
4141
</div>
4242
<div>
43-
Costs: <input type="number" ng-model="cost" required >
43+
Costs: <input type="number" ng-model="cost">
4444
</div>
4545
<div>
4646
<b>Total:</b> {{qty * cost | currency}}
@@ -62,11 +62,8 @@ The first kind of new markup are the so called <a name="directive">"{@link direc
6262
They apply special behavior to attributes or elements in the HTML. In the example above we use the
6363
{@link ng.directive:ngApp `ng-app`} attribute, which is linked to a directive that automatically
6464
initializes our application. Angular also defines a directive for the {@link ng.directive:input `input`}
65-
element that adds extra behavior to the element. E.g. it is able to automatically validate that the entered
66-
text is non empty by evaluating the `required` attribute.
67-
The {@link ng.directive:ngModel `ng-model`} directive stores/updates
68-
the value of the input field into/from a variable and shows the validation state of the input field by
69-
adding css classes. In the example we use these css classes to mark an empty input field with a red border.
65+
element that adds extra behavior to the element. The {@link ng.directive:ngModel `ng-model`} directive
66+
stores/updates the value of the input field into/from a variable.
7067

7168
<div class="alert alert-info">
7269
**Custom directives to access the DOM**: In Angular, the only place where an application touches the DOM is

0 commit comments

Comments
 (0)