diff --git a/docs/content/guide/concepts.ngdoc b/docs/content/guide/concepts.ngdoc index c7e8af5abe82..602dc0c5ff59 100644 --- a/docs/content/guide/concepts.ngdoc +++ b/docs/content/guide/concepts.ngdoc @@ -55,11 +55,11 @@ Try out the Live Preview above, and then let's walk through the example and desc This looks like normal HTML, with some new markup. In Angular, a file like this is called a -"{@link templates template}". When Angular starts your application, it parses and -processes this new markup from the template using the so-called "{@link compiler compiler}". -The loaded, transformed and rendered DOM is then called the "view". +{@link templates template}. When Angular starts your application, it parses and +processes this new markup from the template using the {@link compiler compiler}. +The loaded, transformed and rendered DOM is then called the view. -The first kind of new markup are the so-called "{@link directive directives}". +The first kind of new markup are the {@link directive directives}. They apply special behavior to attributes or elements in the HTML. In the example above we use the {@link ng.directive:ngApp `ng-app`} attribute, which is linked to a directive that automatically initializes our application. Angular also defines a directive for the {@link ng.directive:input `input`} @@ -75,16 +75,16 @@ stores/updates the value of the input field into/from a variable. The second kind of new markup are the double curly braces `{{ expression | filter }}`: When the compiler encounters this markup, it will replace it with the evaluated value of the markup. -An "{@link expression expression}" in a template is a JavaScript-like code snippet that allows +An {@link expression expression} in a template is a JavaScript-like code snippet that allows to read and write variables. Note that those variables are not global variables. Just like variables in a JavaScript function live in a scope, -Angular provides a "{@link scope scope}" for the variables accessible to expressions. -The values that are stored in variables on the scope are referred to as the "model" +Angular provides a {@link scope scope} for the variables accessible to expressions. +The values that are stored in variables on the scope are referred to as the model in the rest of the documentation. Applied to the example above, the markup directs Angular to "take the data we got from the input widgets and multiply them together". -The example above also contains a "{@link guide/filter filter}". +The example above also contains a {@link guide/filter filter}. A filter formats the value of an expression for display to the user. In the example above, the filter {@link ng.filter:currency `currency`} formats a number into an output that looks like money. @@ -92,7 +92,7 @@ into an output that looks like money. The important thing in the example is that Angular provides _live_ bindings: Whenever the input values change, the value of the expressions are automatically recalculated and the DOM is updated with their values. -The concept behind this is "{@link databinding two-way data binding}". +The concept behind this is {@link databinding two-way data binding}. ## Adding UI logic: Controllers @@ -150,7 +150,7 @@ different currencies and also pay the invoice. What changed? -First, there is a new JavaScript file that contains a so-called "{@link controller controller}". +First, there is a new JavaScript file that contains a {@link controller controller}. More exactly, the file contains a constructor function that creates the actual controller instance. The purpose of controllers is to expose variables and functionality to expressions and directives. @@ -182,8 +182,8 @@ The following graphic shows how everything works together after we introduced th ## View independent business logic: Services Right now, the `InvoiceController` contains all logic of our example. When the application grows it -is a good practice to move view independent logic from the controller into a so called -"{@link services service}", so it can be reused by other parts +is a good practice to move view independent logic from the controller into a +{@link services service}, so it can be reused by other parts of the application as well. Later on, we could also change that service to load the exchange rates from the web, e.g. by calling the Yahoo Finance API, without changing the controller. @@ -255,15 +255,15 @@ We moved the `convertCurrency` function and the definition of the existing curre into the new file `finance2.js`. But how does the controller get a hold of the now separated function? -This is where "{@link di Dependency Injection}" comes into play. +This is where {@link di Dependency Injection} comes into play. Dependency Injection (DI) is a software design pattern that deals with how objects and functions get created and how they get a hold of their dependencies. Everything within Angular (directives, filters, controllers, services, ...) is created and wired using dependency injection. Within Angular, -the DI container is called the "{@link di injector}". +the DI container is called the {@link di injector}. To use DI, there needs to be a place where all the things that should work together are registered. -In Angular, this is the purpose of the so-called "{@link module modules}". +In Angular, this is the purpose of the {@link module modules}. When Angular starts, it will use the configuration of the module with the name defined by the `ng-app` directive, including the configuration of all modules that this module depends on.