aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/compiler.ngdoc
diff options
context:
space:
mode:
authorManuel Kiessling2013-05-23 22:48:00 +0200
committerPete Bacon Darwin2013-06-04 20:38:27 +0100
commit73fd3ca2eb276aaec8e54d0517a576e75f73554a (patch)
treec20d5db3bb864ef16181d71301116d0838a7a8e9 /docs/content/guide/compiler.ngdoc
parentefe8ad51ed07320eb13bc21356f6faf7c8c3b4a1 (diff)
downloadangular.js-73fd3ca2eb276aaec8e54d0517a576e75f73554a.tar.bz2
docs(guide/compiler): fix some minor language errors
Diffstat (limited to 'docs/content/guide/compiler.ngdoc')
-rw-r--r--docs/content/guide/compiler.ngdoc23
1 files changed, 11 insertions, 12 deletions
diff --git a/docs/content/guide/compiler.ngdoc b/docs/content/guide/compiler.ngdoc
index dc835808..fbba4a0e 100644
--- a/docs/content/guide/compiler.ngdoc
+++ b/docs/content/guide/compiler.ngdoc
@@ -6,21 +6,21 @@
Angular's {@link api/ng.$compile HTML compiler} allows the developer to teach the
browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute
-and even create new HTML element or attributes with custom behavior. Angular calls these behavior
+and even create new HTML elements or attributes with custom behavior. Angular calls these behavior
extensions {@link api/ng.$compileProvider#directive directives}.
HTML has a lot of constructs for formatting the HTML for static documents in a declarative fashion.
For example if something needs to be centered, there is no need to provide instructions to the
-browser how the window size needs to be divided in half so that center is found, and that this
-center needs to be aligned with the text's center. Simply add `align="center"` attribute to any
+browser how the window size needs to be divided in half so that the center is found, and that this
+center needs to be aligned with the text's center. Simply add an `align="center"` attribute to any
element to achieve the desired behavior. Such is the power of declarative language.
But the declarative language is also limited, since it does not allow you to teach the browser new
syntax. For example there is no easy way to get the browser to align the text at 1/3 the position
-instead of 1/2. What is needed is a way to teach browser new HTML syntax.
+instead of 1/2. What is needed is a way to teach the browser new HTML syntax.
Angular comes pre-bundled with common directives which are useful for building any app. We also
-expect that you will create directives that are specific to your app. These extension become a
+expect that you will create directives that are specific to your app. These extensions become a
Domain Specific Language for building your application.
All of this compilation takes place in the web browser; no server side or pre-compilation step is
@@ -39,17 +39,16 @@ process happens in two phases.
scope model are reflected in the view, and any user interactions with the view are reflected
in the scope model. This makes the scope model the single source of truth.
-Some directives such {@link api/ng.directive:ngRepeat
-`ng-repeat`} clone DOM elements once for each item in collection. Having a compile and link phase
-improves performance since the cloned template only needs to be compiled once, and then linked
-once for each clone instance.
+Some directives such as {@link api/ng.directive:ngRepeat `ng-repeat`} clone DOM elements once
+for each item in a collection. Having a compile and link phase improves performance since the
+cloned template only needs to be compiled once, and then linked once for each clone instance.
# Directive
-A directive is a behavior which should be triggered when specific HTML constructs are encountered in
-the compilation process. The directives can be placed in element names, attributes, class names, as
-well as comments. Here are some equivalent examples of invoking the {@link
+A directive is a behavior which should be triggered when specific HTML constructs are encountered
+during the compilation process. The directives can be placed in element names, attributes, class
+names, as well as comments. Here are some equivalent examples of invoking the {@link
api/ng.directive:ngBind `ng-bind`} directive.
<pre>