From b842642b574a2b95c53b791308ed1bf8ff9d304d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 15 Jun 2011 22:31:40 -0700 Subject: docs - stripping extra new lines --- .../guide/dev_guide.bootstrap.auto_bootstrap.ngdoc | 29 ---------- .../dev_guide.bootstrap.manual_bootstrap.ngdoc | 10 ---- docs/content/guide/dev_guide.bootstrap.ngdoc | 21 ------- ...e.compiler.directives.creating_directives.ngdoc | 10 ---- .../guide/dev_guide.compiler.directives.ngdoc | 14 ----- .../dev_guide.compiler.directives_widgets.ngdoc | 11 ---- .../dev_guide.compiler.extending_compiler.ngdoc | 11 ---- docs/content/guide/dev_guide.compiler.markup.ngdoc | 24 -------- docs/content/guide/dev_guide.compiler.ngdoc | 8 --- .../dev_guide.compiler.testing_dom_element.ngdoc | 7 --- ...dev_guide.compiler.understanding_compiler.ngdoc | 19 ------ ...v_guide.compiler.widgets.creating_widgets.ngdoc | 20 ------- .../content/guide/dev_guide.compiler.widgets.ngdoc | 11 ---- docs/content/guide/dev_guide.di.ngdoc | 10 ---- .../guide/dev_guide.di.understanding_di.ngdoc | 29 ---------- .../guide/dev_guide.di.using_di_controllers.ngdoc | 12 ---- docs/content/guide/dev_guide.expressions.ngdoc | 49 ---------------- docs/content/guide/dev_guide.introduction.ngdoc | 10 ---- docs/content/guide/dev_guide.mvc.ngdoc | 8 --- .../dev_guide.mvc.understanding_controller.ngdoc | 67 +--------------------- .../guide/dev_guide.mvc.understanding_model.ngdoc | 24 -------- .../guide/dev_guide.mvc.understanding_view.ngdoc | 6 -- docs/content/guide/dev_guide.overview.ngdoc | 50 ---------------- .../dev_guide.scopes.controlling_scopes.ngdoc | 11 ---- docs/content/guide/dev_guide.scopes.ngdoc | 13 ----- .../dev_guide.scopes.understanding_scopes.ngdoc | 14 ----- .../guide/dev_guide.scopes.updating_scopes.ngdoc | 9 --- .../guide/dev_guide.scopes.working_scopes.ngdoc | 13 ----- .../dev_guide.services.creating_services.ngdoc | 12 ---- .../dev_guide.services.injecting_controllers.ngdoc | 12 ---- .../dev_guide.services.managing_dependencies.ngdoc | 14 ----- docs/content/guide/dev_guide.services.ngdoc | 6 -- .../dev_guide.services.registering_services.ngdoc | 16 ------ .../dev_guide.services.testing_services.ngdoc | 14 ----- ...dev_guide.services.understanding_services.ngdoc | 10 ---- docs/content/guide/dev_guide.templates.css.ngdoc | 18 ------ .../guide/dev_guide.templates.databinding.ngdoc | 9 --- ..._guide.templates.filters.creating_filters.ngdoc | 11 ---- .../guide/dev_guide.templates.filters.ngdoc | 10 ---- ...dev_guide.templates.filters.using_filters.ngdoc | 14 ----- ....templates.formatters.creating_formatters.ngdoc | 8 --- .../guide/dev_guide.templates.formatters.ngdoc | 6 -- ...ide.templates.formatters.using_formatters.ngdoc | 3 - docs/content/guide/dev_guide.templates.ngdoc | 12 ---- ....templates.validators.creating_validators.ngdoc | 18 ------ .../guide/dev_guide.templates.validators.ngdoc | 29 ---------- docs/content/guide/dev_guide.unit-testing.ngdoc | 36 ------------ docs/content/guide/index.ngdoc | 19 ------ 48 files changed, 2 insertions(+), 795 deletions(-) (limited to 'docs/content/guide') diff --git a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc index 1c5e3e26..0b03e19c 100644 --- a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc +++ b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc @@ -3,30 +3,23 @@ @name Developer Guide: Initializing Angular: Automatic Initiialization @description - Angular initializes automatically when you load the angular script into your page, specifying angular's `ng:autobind` attribute with no arguments: - ` - From the `name` attribute of the `` tags, angular automatically sets up two-way data binding, and we also demonstrate some easy input validation: - Quantity: Cost: - These input widgets look normal enough, but consider these points: - * When this page loaded, angular bound the names of the input widgets (`qty` and `cost`) to variables of the same name. Think of those variables as the "Model" component of the Model-View-Controller design pattern. @@ -131,13 +107,10 @@ or leave the the input fields blank, the borders turn red color, and the display These `ng:` directives make it easier to implement field validators than coding them in JavaScript, no? Yes. - And finally, the mysterious `{{ double curly braces }}`: - Total: {{qty * cost | currency}} - This notation, `{{ _expression_ }}`, is a bit of built-in angular {@link dev_guide.compiler.markup markup}, a shortcut for displaying data to the user. The expression within curly braces gets transformed by the angular compiler into an angular directive ({@link api/angular.directive.ng:bind @@ -145,36 +118,28 @@ ng:bind}). The expression itself can be a combination of both an expression and dev_guide.templates.filters filter}: `{{ expression | filter }}`. Angular provides filters for formatting display data. - In the example above, the expression in double-curly braces directs angular to, "Bind the data we got from the input widgets to the display, multiply them together, and format the resulting number into output that looks like money." - - # The Angular Philosophy - Angular is built around the belief that declarative code is better than imperative when it comes to building UIs and wiring software components together, while imperative code is excellent for expressing business logic. - Not to put too fine a point on it, but if you wanted to add a new label to your application, you could do so by simply adding text to the HTML template, saving the code, and refreshing your browser: -
 Hello
 
- Or, as in programmatic systems (like {@link http://code.google.com/webtoolkit/ GWT}), you would have to write the code and then run the code like this: -
 var label = new Label();
 label.setText('Hello');
@@ -182,15 +147,11 @@ label.setClass('label');
 parent.addChild(label);
 
- That's one line of markup versus four times as much code. - - ## More Angular Philosophy - * It is a very good idea to decouple DOM manipulation from app logic. This dramatically improves the testability of the code. * It is a really, _really_ good idea to regard app testing as equal in importance to app writing. @@ -201,11 +162,9 @@ development work to progress in parallel, and allows for reuse of both sides. building an app: from designing the UI, through writing the business logic, to testing. * It is always good to make common tasks trivial and difficult tasks possible. - Now that we're homing in on what angular is, perhaps now would be a good time to list a few things that angular is not: - * It's not a Library. You don't just call its functions, although it does provide you with some utility APIs. * It's not a DOM Manipulation Library. Angular uses jQuery to manipulate the DOM behind the scenes, @@ -225,14 +184,10 @@ changes to the model are automatically reflected in the view. Any changes by the are automatically reflected in the model. - - # Why You Want Angular - Angular frees you from the following pain: - * **Registering callbacks:** Registering callbacks clutters your code, making it hard to see the forest for the trees. Removing common boilerplate code such as callbacks is a good thing. It vastly reduces the amount of JavaScript coding _you_ have to do, and it makes it easier to see what your @@ -256,15 +211,11 @@ get started developing features quickly. As a bonus, you get full control over t process in automated tests. - - # Watch a Presentation About Angular - Here is an early presentation on angular, but note that substantial development has occurred since the talk was given in July of 2010. - @@ -274,7 +225,6 @@ the talk was given in July of 2010. allowfullscreen="true" width="480" height="385"> - {@link https://docs.google.com/present/edit?id=0Abz6S2TvsDWSZDQ0OWdjaF8yNTRnODczazdmZg&hl=en&authkey=CO-b7oID diff --git a/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc b/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc index ca63cbc3..cdbad444 100644 --- a/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc +++ b/docs/content/guide/dev_guide.scopes.controlling_scopes.ngdoc @@ -3,48 +3,37 @@ @name Developer Guide: Scopes: Applying Controllers to Scopes @description - When a controller function is applied to a scope, the scope is augmented with the behavior defined in the controller. The end result is that the scope behaves as if it were the controller: -
 var scope = angular.scope();
 scope.salutation = 'Hello';
 scope.name = 'World';
 
-
 expect(scope.greeting).toEqual(undefined);
 
-
 scope.$watch('name', function(){
 this.greeting = this.salutation + ' ' + this.name + '!';
 });
 
-
 expect(scope.greeting).toEqual('Hello World!');
 scope.name = 'Misko';
 // scope.$eval() will propagate the change to listeners
 expect(scope.greeting).toEqual('Hello World!');
 
-
 scope.$eval();
 expect(scope.greeting).toEqual('Hello Misko!');
 
- - ## Related Topics - * {@link dev_guide.scopes Angular Scope Objects} * {@link dev_guide.scopes.understanding_scopes Understanding Angular Scopes} * {@link dev_guide.scopes.working_scopes Working With Angular Scopes} * {@link dev_guide.scopes.updating_scopes Updating Angular Scopes} - ## Related API - * {@link api/angular.scope Angular Scope API} diff --git a/docs/content/guide/dev_guide.scopes.ngdoc b/docs/content/guide/dev_guide.scopes.ngdoc index 730ac348..e9706e2f 100644 --- a/docs/content/guide/dev_guide.scopes.ngdoc +++ b/docs/content/guide/dev_guide.scopes.ngdoc @@ -4,48 +4,35 @@ @description - - An angular scope is a JavaScript type defined by angular. Instances of this type are objects that serve as the context within which all model and controller methods live and get evaluated. - Angular links scope objects to specific points in a compiled (processed) template. This linkage provides the contexts in which angular creates data-bindings between the model and the view. You can think of angular scope objects as the medium through which the model, view, and controller communicate. - In addition to providing the context in which data is evaluated, angular scope objects watch for model changes. The scope objects also notify all components interested in any model changes (for example, functions registered through {@link api/angular.scope.$watch $watch}, bindings created by {@link api/angular.directive.ng:bind ng:bind}, or HTML input elements). - Angular scope objects are responsible for: - * Gluing the model, controller and view template together. * Providing the mechanism to watch for model changes ({@link api/angular.scope.$watch}). * Notifying interested components when the model changes ({@link api/angular.scope.$eval}). * Providing the context in which all controller functions and angular expressions are evaluated. - - ## Related Topics - * {@link dev_guide.scopes.understanding_scopes Understanding Scopes} * {@link dev_guide.scopes.working_scopes Working With Scopes} * {@link dev_guide.scopes.controlling_scopes Applying Controllers to Scopes} * {@link dev_guide.scopes.updating_scopes Updating Scopes} - ## Related API - * {@link api/angular.scope Angular Scope API} - - diff --git a/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc b/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc index 073c919e..704c9241 100644 --- a/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc +++ b/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc @@ -3,7 +3,6 @@ @name Developer Guide: Scopes: Understanding Scopes @description - Angular automatically creates a root scope during initialization, and attaches it to the page's root DOM element (usually ``). The root scope object, along with any of its child scope objects, serves as the infrastructure on which your data model is built. The data model (JavaScript @@ -11,20 +10,16 @@ objects, arrays, or primitives) is attached to angular scope properties. Angular values to the DOM where bindings are specified in the template. Angular attaches any controller functions you have created to their respective scope objects. - - Angular scopes can be nested, so a child scope has a parent scope upstream in the DOM. When you display an angular expression in the view, angular walks the DOM tree looking in the closest attached scope object for the specified data. If it doesn't find the data in the closest attached scope, it looks further up the scope hierarchy until it finds the data. - A child scope object inherits properties from its parents. For example, in the following snippet of code, observe how the value of `name` changes, based on the HTML element it is displayed in: -