1- @workInProgress
21@ngdoc overview
32@name Tutorial
43@description
54
65A great way to get introduced to angular is to work through the {@link tutorial.step_00 angular
76tutorial}, which walks you through the construction of an angular web app. The app you will build
87in the tutorial is loosely based on the {@link http://www.google.com/phone/ Google phone gallery
9- app}. The {@link http://angular.github.com/angular-phonecat/step-11/app/ end result of our effort}
10- is visually simpler, but demonstrates many of the angular features without distractions in the
11- form of CSS code.
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.
1211
13- This tutorial app ends up like a Google phone gallery app, but is originally based on the {@link
14- https://github.com/angular/angular-seed angular-seed project}. The angular seed app isn't
15- necessary for building angular apps, but it helps you get started quickly and makes the
16- development and testing process much easier. Angular-seed includes a simple example, the latest
17- angular libraries, test libraries, and scripts. It provides all of these in an environment that
18- is pre-configured for developing a typical web app.
12+ The starting point for our tutorial is the {@link https://github.com/angular/angular-seed
13+ angular-seed project}.
1914
20- Once you set up your tutorial environment, you should be able to get through the material in less
21- than a day and you'll have fun doing it. More experienced coders may be able to zip through the
22- exercises in an afternoon. In any case, we promise that your time will be well spent!
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+
19+ * Removed the example app
20+ * Added phone images to `app/img/phones`
21+ * Added phone data files (JSON) to `app/phones`
22+
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.
2325
2426When you finish the tutorial you will be able to:
2527
2628* Create a simple dynamic application that works in any browser
2729* Define the differences between angular and common JavaScript frameworks
28- * Understand angular expressions
2930* Understand how data binding works in angular
3031* Use the angular-seed project to quickly boot-strap your own projects
3132* Create and run tests
3233* Identify resources for learning more about angular
3334
34- You can work through the tutorial in any of the following ways:
35-
36- * <a href="#UsingGit">Using Git</a>. Use the Git versioning system to get the files for each step.
37- * <a href="#UsingSnapshots">Using Snapshots</a>. Download snapshots (files for each step of the
38- tutorial) and tinker with them.
39- * <a href="#ReadingExamples">Reading the Examples</a>. Read through the examples, and inspect
40- results and code on our server.
35+ 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.
4138
42- The first two ways (Git and snapshots) give you a fuller experience, in that you can run the unit
43- and end-to-end tests in addition to the tutorial app. They also give you the ability to play
44- around with the code and get instant feedback in your browser. The last way (reading through the
45- tutorial online) requires no setup on your machine, but you can't run the tests, and it won't be
46- as easy to play around with the code.
39+ 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!
4741
4842<a name="PreReqs"></a>
49- # Prerequisites for Git and Snapshots
43+ # Prerequisites
5044
51- To run the tutorial app and tests on your machine (using Git or the snapshots) you will need the
52- following:
45+ To run the tutorial app and tests on your machine you will need the following:
5346
54- * You need to be running on a Mac or Linux machine.
47+ * A Mac or Linux machine (required by the tutorial scripts, not angular)
5548* An http server running on your system. If you don't already have one installed, you can install
5649`node.js` ({@link https://github.com/joyent/node/wiki/Installation node.js install}) or another
5750http sever (such as Apache, etc.).
58- * Java. This is required for running tests. Angular itself doesn't require Java .
59- * A modern browser (including IE8+). Needed for viewing and debugging code .
60- * A text editor of your choice .
51+ * Java. This is only required for if you want to run tests via JsTestDriver .
52+ * A web browser.
53+ * A text editor.
6154
62- <a name="UsingGit"></a>
6355# Using Git
6456
65- The following instructions are for developers who are comfortable with Git's versioning system:
57+ The following instructions are for developers who are comfortable with Git versioning system:
6658
67591. Check to be sure you have all of the <a href="#PreReqs">prerequisites</a> on your system.
6860
69612. Clone the angular-phonecat repository located at {@link
7062https://github.com/angular/angular-phonecat angular-phonecat} by running the following command in
7163a terminal:
7264
73- git clone git://github.com/angular/angular-phonecat.git
74-
75- This will create a directory called `angular-phonecat`.
76-
77- 3. In terminal, navigate to the `angular-phonecat` directory and run:
65+ git clone git://github.com/angular/angular-phonecat.git
7866
79- git checkout step-0
67+ This will create a directory called `angular-phonecat` in the current directory.
8068
81- (You can run `git checkout step-[0-11]` to go to any of the steps in the tutorial).
69+ 3. Change your current directory to `angular-phonecat`.
8270
83- 4. To see the app running in a browser, do the following:
84- * __For node.js users:__
85- 1. Run `./scripts/web-server.js` to start the app server.
86- 2. Open a browser window for the app and navigate to http://localhost:8000/app/index.html.
71+ cd angular-phonecat
8772
88- * __For other http servers:__
89- 1. Configure the server to serve the files in the `angular-phonecat` directory.
90- 2. Run `./scripts/web-server.js` to start the app server.
91- 3. Navigate in your browser to
92- http://localhost:[*port-number*]/[*context-path*]/app/index.html.
73+ The tutorial instructions assume you are running all commands from this directory.
9374
94- 5. To see tests running in a browser, do the following:
95- * __For node.js users:__
96- 1. Run `./scripts/test-server.sh` to start the test web server.
97- 2. Open a browser window for the tests, navigate to http://localhost:9876, and choose
98- "strict mode".
99- * __For other http servers:__
100- 1. Configure the server to serve the files in the `angular-phonecat` directory.
101- 1. Run `./scripts/test-server.sh` to start the test web server.
102- 3. Navigate in your browser to http://localhost:[*port-number*]/, and choose "strict mode".
75+ Read the Tutorial Navigation section, then navigate to Step 0.
10376
10477
105-
106- <a name="UsingSnapshots"></a>
10778# Using Snapshots
10879
10980Snapshots are the sets of files that reflect the state of the tutorial app at each step. These
@@ -113,60 +84,18 @@ knowledge of Git. You can download and install the snapshot files as follows:
11384
114851. Check to be sure you have all of the <a href="#PreReqs">prerequisites</a> on your system.
11586
116- 2. Navigate to [*the angular server*], and download and unzip [*the snapshot file*] to an
117- [*install-dir*] of your choosing .
87+ 2. Navigate to [*the angular server*], download and then unzip [*the snapshot file*] to an
88+ [*install-dir*].
11889
119903. Change directories to [*install-dir*]/sandbox.
12091
121- 4. Run the following command:
122- * `./goto_step.sh 0`
123-
124- You have to start out at the beginning, which is Step 0. After you set up Step 0, you can skip
125- around between any steps.
126-
127- 1. To see the app running in your browser, do the following:
128- * __For node.js users:__
129- 1. Run `./scripts/web-server.js` to run the web server.
130- 2. Open a browser window for the app and navigate to http://localhost:8000/app/index.html.
131- 3. Open a browser window for the tests, navigate to http://localhost:9876, and choose
132- "strict mode".
133-
134- * __For other http servers:__
135- 1. Configure servers to serve the app and test files in the [*install-dir*]/sandbox.
136- 2. Start the server.
137- 3. Navigate in your app browser to
138- http://localhost:[*port-number*]/[*context-path*]/app/index.html.
139- 4. Navigate in your test browser to http://localhost:[*port-number*] and choose "strict
140- mode".
141-
142- 1. To view the tutorial app at different steps, run `./goto_step.sh [0-11]` and then refresh your
143- browser. For example, say you're on Step 5 of the tutorial, and you want to see the app in action:
144-
145- 1. Run `goto_step.sh 5` from the command line in the `sandbox` directory.
146- 1. Refresh your app browser.
147-
148- <a name="ReadingExamples"></a>
149- # Reading the Examples
150-
151- If you don't want to set up anything on your local machine, you can read through the tutorial and
152- inspect the tutorial files on our servers; doing this will give you a good idea of what angular
153- does, but you won't be able to make any code changes and experiment on your own.
154-
155- To see the running app at each tutorial step, click the "Example" link at the top or bottom of
156- each tutorial page.
157-
158- To view the code differences between tutorial steps, click the Code Diff link at top or bottom of
159- each tutorial page. Additions are highlighted in green; deletions are highlighted in red.
160-
161-
162- # Relative URLs
163- Throughout the tutorial, we use relative URLs to refer to files hosted on our local http server.
164- The absolute URL depends on your configuration. For example, if you are using the node.js server,
165- `app/index.html` translates to:
92+ cd [*install-dir*]/sandbox
16693
167- http://localhost:8000/app/index.html
94+ Read the Tutorial Navigation section, then navigate to step-0.
16895
169- If you are using your own http server running on port 8080 and the tutorial files are hosted at
170- `/angular_tutorial`, `app/index.html` translates to:
96+ # Tutorial Navigation
17197
172- http://localhost:8080/angular_tutorial/app/index.html
98+ To see the app running on the angular server, click the "Live Demo" link at the top or bottom of
99+ any tutorial page. To view the code differences between tutorial steps, click the Code Diff link
100+ at top or bottom of each tutorial page. In the Code Diff, additions are highlighted in green;
101+ deletions are highlighted in red.
0 commit comments