|
2 | 2 | @name Tutorial |
3 | 3 | @description |
4 | 4 |
|
5 | | -A great way to get introduced to angular is to work through the {@link tutorial.step_00 angular |
6 | | -tutorial}, which walks you through the construction of an angular web app. The app you will build |
7 | | -in the tutorial is loosely based on the {@link http://www.google.com/phone/ Google phone gallery |
8 | | -app}. The {@link http://angular.github.com/angular-phonecat/step-11/app/#/phones end result of our |
9 | | -effort} is visually simpler, but demonstrates many of the angular features without distractions in |
10 | | -the form of CSS code. |
11 | 5 |
|
12 | | -The starting point for our tutorial is the {@link https://github.com/angular/angular-seed |
13 | | -angular-seed project}. |
| 6 | +A great way to get introduced to angular is to work through this tutorial, which walks you through |
| 7 | +the construction of an angular web app. The app you will build is a catalog that displays a list of |
| 8 | +Android devices, lets you filter the list to see only devices that interest you, and then view |
| 9 | +details for any device. |
14 | 10 |
|
15 | | -The angular-seed project includes a simple example app, the latest angular libraries, test |
16 | | -libraries, and scripts. It provides all of these in an environment that is pre-configured for |
17 | | -developing a typical web app. For this tutorial, we modified the angular-seed as follows: |
18 | 11 |
|
19 | | -* Removed the example app |
20 | | -* Added phone images to `app/img/phones` |
21 | | -* Added phone data files (JSON) to `app/phones` |
| 12 | +<img src="img/tutorial/catalog_screen.png"> |
| 13 | + |
| 14 | + |
| 15 | +As you work through this tutorial, you will learn how angular makes browsers smarter — without the |
| 16 | +use of extensions or plugins. |
| 17 | + |
| 18 | + |
| 19 | +* You will see examples of how to use client-side data binding and dependency injection to build |
| 20 | +dynamic views of data that change immediately in response to user actions. |
| 21 | +* You will see how Angular creates listeners on your data without the need for DOM manipulation. |
| 22 | +* You will learn a better, easier way to test your web apps. |
| 23 | +* You will learn how to use Angular services to make common web tasks, such as getting data into |
| 24 | +your app, easier. |
| 25 | + |
| 26 | + |
| 27 | +And all of this works in any browser without modifications! |
22 | 28 |
|
23 | | -**Note**: Using the angular seed app isn't required for building angular apps, but doing so helps |
24 | | -you get started quickly and makes the development and testing process much easier. |
25 | 29 |
|
26 | 30 | When you finish the tutorial you will be able to: |
27 | 31 |
|
28 | | -* Create a simple dynamic application that works in any browser |
| 32 | + |
| 33 | +* Create a dynamic application that works in any browser |
29 | 34 | * Define the differences between angular and common JavaScript frameworks |
30 | 35 | * Understand how data binding works in angular |
31 | 36 | * Use the angular-seed project to quickly boot-strap your own projects |
32 | 37 | * Create and run tests |
33 | 38 | * Identify resources for learning more about angular |
34 | 39 |
|
| 40 | + |
35 | 41 | Mac and Linux users can work through the tutorial, run tests, and experiment with the code using |
36 | | -Git or the snapshots described below. Windows users will be able follow the tutorial and read |
37 | | -through the source code and view the application running on our servers at different stages. |
| 42 | +Git or the snapshots described below. Windows users will be able read the tutorial but won't be |
| 43 | +able to run the tests or experiment with the code. |
| 44 | + |
38 | 45 |
|
39 | 46 | You can go through the whole tutorial in a couple of hours or you may want to spend a pleasant day |
40 | | -really digging into it. In any case, we promise that your time will be well spent! |
| 47 | +really digging into it. If you're looking for a shorter introduction to angular, check out {@link |
| 48 | +http://docs.angularjs.org/#!started started}. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
41 | 56 |
|
42 | 57 | <a name="PreReqs"></a> |
43 | 58 | # Prerequisites |
44 | 59 |
|
| 60 | + |
45 | 61 | To run the tutorial app and tests on your machine you will need the following: |
46 | 62 |
|
47 | | -* A Mac or Linux machine (required by the tutorial scripts, not angular) |
48 | | -* An http server running on your system. If you don't already have one installed, you can install |
49 | | -`node.js` ({@link https://github.com/joyent/node/wiki/Installation node.js install guide}) or |
50 | | -another http sever (such as Apache, etc.). |
51 | | -* Java. This is required for running tests with JsTestDriver. |
| 63 | + |
| 64 | +* A Mac or Linux machine (required for running the tutorial scripts) |
| 65 | +* An http server running on your system. Mac and Linux machines typically have Apache preinstalled. |
| 66 | +If you don't already have an http server installed, you can install `node.js` ({@link |
| 67 | +https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager node.js install guide}) |
| 68 | +or another http sever. |
| 69 | +* {@link http://java.com Java}. |
52 | 70 | * A web browser. |
53 | 71 | * A text editor. |
54 | 72 |
|
55 | 73 |
|
| 74 | + |
| 75 | + |
56 | 76 | # Working with the code |
57 | 77 |
|
| 78 | + |
58 | 79 | There are two ways that you can you follow this tutorial and hack on the code: |
59 | 80 |
|
| 81 | + |
60 | 82 | ## Using Git |
61 | 83 |
|
62 | | -The following instructions are for developers who are comfortable with the Git versioning system: |
| 84 | + |
| 85 | +The following instructions are for Git users. If you're not a Git user, skip down to the "Using |
| 86 | +Snapshots" section. |
| 87 | + |
63 | 88 |
|
64 | 89 | 1. Check to be sure you have all of the <a href="#PreReqs">prerequisites</a> on your system. |
65 | 90 |
|
| 91 | + |
66 | 92 | 2. Clone the angular-phonecat repository located at {@link |
67 | 93 | https://github.com/angular/angular-phonecat GitHub} by running the following command in a terminal: |
68 | 94 |
|
| 95 | + |
69 | 96 | git clone git://github.com/angular/angular-phonecat.git |
70 | 97 |
|
71 | | - This will create a directory called `angular-phonecat` in the current directory. |
72 | 98 |
|
73 | | -3. Change your current directory to `angular-phonecat`. |
| 99 | + This will create a directory called `angular-phonecat` in the current directory. |
| 100 | + |
| 101 | + |
| 102 | +3. Change your current directory to `angular-phonecat`. |
| 103 | + |
| 104 | + |
| 105 | + cd angular-phonecat |
74 | 106 |
|
75 | | - cd angular-phonecat |
76 | 107 |
|
77 | 108 | The tutorial instructions assume you are running all commands from this directory. |
78 | 109 |
|
79 | 110 |
|
| 111 | + |
| 112 | + |
80 | 113 | ## Using Snapshots |
81 | 114 |
|
82 | | -Snapshots are the sets of files that reflect the state of the tutorial app at each step. These |
83 | | -files include the HTML, CSS, and JavaScript for the app, plus Jasmine JavaScript files and Java |
84 | | -libraries for the test stack. These will let you run the tutorial app and tests, without requiring |
85 | | -knowledge of Git. You can download and install the snapshot files as follows: |
86 | 115 |
|
87 | 116 | 1. Check to be sure you have all of the <a href="#PreReqs">prerequisites</a> on your system. |
88 | 117 |
|
89 | | -2. {@link TODO Download the zip archive} with all files and unzip them into `[tutorial-dir]` |
90 | | -directory. |
| 118 | + |
| 119 | +2. {@link http://code.angularjs.org/angular-phonecat-snapshots.zip Download the zip archive} with |
| 120 | +all files and unzip them into `[tutorial-dir]` directory. |
| 121 | + |
| 122 | + |
91 | 123 |
|
92 | 124 |
|
93 | 125 | 3. Change directories to `[tutorial-dir]/sandbox`. |
94 | 126 |
|
| 127 | + |
95 | 128 | cd [tutorial-dir]/sandbox |
96 | 129 |
|
97 | 130 |
|
98 | | -# Tutorial Navigation |
99 | 131 |
|
100 | | -To see the app running on the angular server, click the "Live Demo" link at the top or bottom of |
101 | | -any tutorial page. To view the code differences between tutorial steps, click the Code Diff link |
102 | | -at top or bottom of each tutorial page. In the Code Diff, additions are highlighted in green; |
103 | | -deletions are highlighted in red. |
104 | 132 |
|
| 133 | +Let's get going with {@link tutorial/step_00 step 0}. |
105 | 134 |
|
106 | | -Let's get going and proceed to {@link tutorial/step_00 step 0}. |
|
0 commit comments