Skip to content

Commit a64349b

Browse files
Merge pull request #121 from angular/master
Setting to disable all pop-ups
2 parents 4f7a3b7 + 2dfb6b4 commit a64349b

File tree

13 files changed

+186
-176
lines changed

13 files changed

+186
-176
lines changed

docs/config/services/deployments/production.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var cdnUrl = googleCdnUrl + versionInfo.cdnVersion;
1515
// docs.angularjs.org and code.angularjs.org need them.
1616
var versionPath = versionInfo.currentVersion.isSnapshot ?
1717
'snapshot' :
18-
(versionInfo.currentVersion.version || versionInfo.currentVersion.version);
18+
versionInfo.currentVersion.version;
1919
var examplesDependencyPath = angularCodeUrl + versionPath + '/';
2020

2121
module.exports = function productionDeployment(getVersion) {

docs/content/tutorial/index.ngdoc

+67-23
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ a few git commands.
6464

6565
### Install Git
6666

67-
You can download and install Git from http://git-scm.com/download. Once installed, you should have
67+
You can download and install Git from https://git-scm.com/download. Once installed, you should have
6868
access to the `git` command line tool. The main commands that you will need to use are:
6969

7070
* `git clone ...`: Clone a remote repository onto your local machine.
@@ -99,8 +99,8 @@ The tutorial instructions, from now on, assume you are running all commands from
9999

100100
### Install Node.js
101101

102-
If you want to run the preconfigured local web server and the test tools then you will also need
103-
[Node.js v4+][node].
102+
In order to install dependencies (such as the test tools and AngularJS itself) and run the
103+
preconfigured local web server, you will also need [Node.js v6+][node].
104104

105105
You can download a Node.js installer for your operating system from https://nodejs.org/en/download/.
106106

@@ -125,22 +125,25 @@ npm --version
125125
[Node Version Manager (nvm)][nvm] or [Node Version Manager (nvm) for Windows][nvm-windows].
126126
</div>
127127

128-
Once you have Node.js installed on your machine, you can download the tool dependencies by running:
128+
By installing Node.js, you also get [npm][npm], which is a command line executable for downloading
129+
and managing Node.js packages. We use it to download the AngularJS framework as well as development
130+
and testing tools.
131+
132+
Once you have Node.js installed on your machine, you can download these dependencies by running:
129133

130134
```
131135
npm install
132136
```
133137

134-
This command reads angular-phonecat's `package.json` file and downloads the following tools into the
135-
`node_modules` directory:
138+
This command reads angular-phonecat's `package.json` file and downloads the following dependencies
139+
into the `node_modules` directory:
136140

137-
* [Bower][bower] - client-side code package manager
138141
* [Http-Server][http-server] - simple local static web server
139142
* [Karma][karma] - unit test runner
140143
* [Protractor][protractor] - end-to-end (E2E) test runner
141144

142-
Running `npm install` will also automatically use bower to download the AngularJS framework into the
143-
`app/bower_components` directory.
145+
Running `npm install` will also automatically copy the AngularJS framework and other dependencies
146+
necessary for our app to work into the `app/lib/` directory.
144147

145148
<div class="alert alert-info">
146149
Note the angular-phonecat project is setup to install and run these utilities via npm scripts.
@@ -160,23 +163,23 @@ tasks that you will need while developing:
160163

161164
### Install Helper Tools (optional)
162165

163-
The Bower, Http-Server, Karma and Protractor modules are also executables, which can be installed
164-
globally and run directly from a terminal/command prompt. You don't need to do this to follow the
165-
tutorial, but if you decide you do want to run them directly, you can install these modules globally
166-
using, `sudo npm install -g ...`.
166+
The Http-Server, Karma and Protractor modules are also executables, which can be installed globally
167+
and run directly from a terminal/command prompt. You don't need to do this to follow the tutorial,
168+
but if you decide you do want to run them directly, you can install these modules globally using,
169+
`sudo npm install --global ...`.
167170

168-
For instance, to install the Bower command line executable you would do:
171+
For instance, to install the `http-server` command line executable you would do:
169172

170173
```
171-
sudo npm install -g bower
174+
sudo npm install --global http-server
172175
```
173176

174-
_(Omit the sudo if running on Windows)_
177+
_(Omit the sudo if running on Windows.)_
175178

176-
Then you can run the bower tool directly, such as:
179+
Then you can run the `http-server` tool directly, such as:
177180

178181
```
179-
bower install
182+
http-server ./app
180183
```
181184

182185

@@ -278,6 +281,45 @@ It is good to run the E2E tests whenever you make changes to the HTML views or w
278281
the application as a whole is executing correctly. It is very common to run E2E tests before pushing
279282
a new commit of changes to a remote repository.
280283

284+
<div class="alert alert-warning">
285+
<p>
286+
Each version of Protractor is compatible with specific browser versions. If you are reading this
287+
some time in the future, it is possible that the specified Protractor version is no longer
288+
compatible with the latest version of Chrome that you are using.
289+
</p>
290+
<p>
291+
If that is the case, you can try upgrading Protractor to newer version. For instructions on how
292+
to upgrade dependencies see [Updating dependencies](tutorial/#updating-dependencies).
293+
</p>
294+
</div>
295+
296+
297+
### Updating dependencies
298+
299+
In order to avoid surprises, all dependencies listed in `package.json` are pinned to specific
300+
versions (this is what the [package-lock.json][package-lock] file is about). This ensures that the
301+
same version of a dependency is installed every time.
302+
303+
Since all dependencies are acquired via npm, you can use the same tool to easily update them as
304+
well (although you probably don't need to for the purpose of this tutorial). Simply run the
305+
preconfigured script:
306+
307+
```
308+
npm run update-deps
309+
```
310+
311+
This will update all packages to the latest version that satisfy their version ranges (as specified
312+
in `package.json`) and also copy the necessary files into `app/lib/`. For example, if `package.json`
313+
contains `"some-package": "1.2.x"`, it will be updated to the latest 1.2.x version (e.g. 1.2.99),
314+
but not to 1.3.x (e.g. 1.3.0).
315+
316+
If you want to update a dependency to a version newer than what the specificed range would permit,
317+
you can change the version range in `package.json` and then run `npm run update-deps` as usual.
318+
319+
<div class="alert alert-info">
320+
See [here][semver-ranges] for more info on the various version range formats.
321+
</div>
322+
281323

282324
### Common Issues
283325

@@ -324,14 +366,16 @@ Now that you have set up your local machine, let's get started with the tutorial
324366

325367

326368
[angular-phonecat]: https://github.com/angular/angular-phonecat
327-
[bower]: http://bower.io/
328-
[git]: http://git-scm.com/
369+
[git]: https://git-scm.com/
329370
[http-server]: https://github.com/nodeapps/http-server
330371
[jdk]: https://en.wikipedia.org/wiki/Java_Development_Kit
331-
[jdk-download]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
372+
[jdk-download]: https://www.oracle.com/technetwork/java/javase/downloads/index.html
332373
[karma]: https://karma-runner.github.io/
333-
[node]: http://nodejs.org/
374+
[node]: https://nodejs.org/
375+
[npm]: https://www.npmjs.com/
334376
[nvm]: https://github.com/creationix/nvm
335377
[nvm-windows]: https://github.com/coreybutler/nvm-windows
378+
[package-lock]: https://docs.npmjs.com/files/package-lock.json
336379
[protractor]: https://github.com/angular/protractor
337-
[selenium]: http://docs.seleniumhq.org/
380+
[selenium]: https://docs.seleniumhq.org/
381+
[semver-ranges]: https://docs.npmjs.com/misc/semver#ranges

docs/content/tutorial/step_00.ngdoc

+7-6
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ The code contains some key AngularJS elements that we will need as we progress.
5151
<head>
5252
<meta charset="utf-8">
5353
<title>My HTML File</title>
54-
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
55-
<script src="bower_components/angular/angular.js"></script>
54+
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.css" />
55+
<script src="lib/angular/angular.js"></script>
5656
</head>
5757
<body>
5858

@@ -84,7 +84,7 @@ For more info on `ngApp`, check out the {@link ngApp API Reference}.
8484
**`angular.js` script tag:**
8585

8686
```html
87-
<script src="bower_components/angular/angular.js"></script>
87+
<script src="lib/angular/angular.js"></script>
8888
```
8989

9090
This code downloads the `angular.js` script which registers a callback that will be executed by the
@@ -154,16 +154,16 @@ and one static binding, and our model is empty. That will soon change!
154154

155155
Most of the files in your working directory come from the [angular-seed project][angular-seed],
156156
which is typically used to bootstrap new AngularJS projects. The seed project is pre-configured to
157-
install the AngularJS framework (via `bower` into the `app/bower_components/` directory) and tools
158-
for developing and testing a typical web application (via `npm`).
157+
install the AngularJS framework (via `npm` into the `app/lib/` directory) and tools for developing
158+
and testing a typical web application (via `npm`).
159159

160160
For the purposes of this tutorial, we modified the angular-seed with the following changes:
161161

162162
* Removed the example app.
163163
* Removed unused dependencies.
164164
* Added phone images to `app/img/phones/`.
165165
* Added phone data files (JSON) to `app/phones/`.
166-
* Added a dependency on [Bootstrap](http://getbootstrap.com) in the `bower.json` file.
166+
* Added a dependency on [Bootstrap][bootstrap-3.3] in the `package.json` file.
167167

168168

169169
## Experiments
@@ -186,3 +186,4 @@ Now let's go to {@link step_01 step 1} and add some content to the web app.
186186

187187

188188
[angular-seed]: https://github.com/angular/angular-seed
189+
[bootstrap-3.3]: https://getbootstrap.com/docs/3.3

docs/content/tutorial/step_02.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The view is constructed by AngularJS from this template.
3333
<html ng-app="phonecatApp">
3434
<head>
3535
...
36-
<script src="bower_components/angular/angular.js"></script>
36+
<script src="lib/angular/angular.js"></script>
3737
<script src="app.js"></script>
3838
</head>
3939
<body ng-controller="PhoneListController">
@@ -317,7 +317,7 @@ by utilizing components.
317317
<ul doc-tutorial-nav="2"></ul>
318318

319319

320-
[jasmine-docs]: http://jasmine.github.io/2.4/introduction.html
321-
[jasmine-home]: http://jasmine.github.io/
320+
[jasmine-docs]: https://jasmine.github.io/api/3.3/global
321+
[jasmine-home]: https://jasmine.github.io/
322322
[karma]: https://karma-runner.github.io/
323-
[mvc-pattern]: http://en.wikipedia.org/wiki/Model–View–Controller
323+
[mvc-pattern]: https://en.wikipedia.org/wiki/Model–View–Controller

docs/content/tutorial/step_03.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ acquired skill.
120120
<html ng-app="phonecatApp">
121121
<head>
122122
...
123-
<script src="bower_components/angular/angular.js"></script>
123+
<script src="lib/angular/angular.js"></script>
124124
<script src="app.js"></script>
125125
<script src="phone-list.component.js"></script>
126126
</head>
@@ -277,7 +277,7 @@ files, so it remains easy to locate as our application grows.
277277

278278

279279
[case-styles]: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles
280-
[jasmine-docs]: http://jasmine.github.io/2.4/introduction.html
281-
[jasmine-home]: http://jasmine.github.io/
280+
[jasmine-docs]: https://jasmine.github.io/api/3.3/global
281+
[jasmine-home]: https://jasmine.github.io/
282282
[karma]: https://karma-runner.github.io/
283-
[mvc-pattern]: http://en.wikipedia.org/wiki/Model–View–Controller
283+
[mvc-pattern]: https://en.wikipedia.org/wiki/Model–View–Controller

docs/content/tutorial/step_07.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
Enough of building an app with three phones in a hard-coded dataset! Let's fetch a larger dataset
1010
from our server using one of AngularJS's built-in {@link guide/services services} called
11-
{@link ng.$http $http}. We will use AngularJS's {@link guide/di dependency injection (DI)} to provide
12-
the service to the `phoneList` component's controller.
11+
{@link ng.$http $http}. We will use AngularJS's {@link guide/di dependency injection (DI)} to
12+
provide the service to the `phoneList` component's controller.
1313

1414
* There is now a list of 20 phones, loaded from the server.
1515

docs/content/tutorial/step_08.ngdoc

+6-5
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ URLs point to the `app/img/phones/` directory.
4747
...
4848
<ul class="phones">
4949
<li ng-repeat="phone in $ctrl.phones | filter:$ctrl.query | orderBy:$ctrl.orderProp" class="thumbnail">
50-
<a href="#/phones/{{phone.id}}" class="thumb">
50+
<a href="#!/phones/{{phone.id}}" class="thumb">
5151
<img ng-src="{{phone.imageUrl}}" alt="{{phone.name}}" />
5252
</a>
53-
<a href="#/phones/{{phone.id}}">{{phone.name}}</a>
53+
<a href="#!/phones/{{phone.id}}">{{phone.name}}</a>
5454
<p>{{phone.snippet}}</p>
5555
</li>
5656
</ul>
@@ -83,7 +83,7 @@ HTTP request to an invalid location.
8383
query.sendKeys('nexus');
8484

8585
element.all(by.css('.phones li a')).first().click();
86-
expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s');
86+
expect(browser.getCurrentUrl()).toContain('index.html#!/phones/nexus-s');
8787
});
8888

8989
...
@@ -110,8 +110,9 @@ You can now rerun `npm run protractor` to see the tests run.
110110

111111
## Summary
112112

113-
Now that you have added phone images and links, go to {@link step_09 step 9} to learn about AngularJS
114-
layout templates and how AngularJS makes it easy to create applications that have multiple views.
113+
Now that you have added phone images and links, go to {@link step_09 step 9} to learn about
114+
AngularJS layout templates and how AngularJS makes it easy to create applications that have
115+
multiple views.
115116

116117

117118
<ul doc-tutorial-nav="8"></ul>

0 commit comments

Comments
 (0)