Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c7e815f

Browse files
docs(bike-shed-migration): fix up links outside the domain
It is safer to use markdown style links and save jsdoc style links for internal links and code references
1 parent 6483dea commit c7e815f

32 files changed

+181
-223
lines changed

docs/content/api/index.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ This module is provided by default and contains the core components of AngularJS
3232

3333
<p>
3434
Some examples include:
35-
{@link ng.directive:ngClick ngClick},
36-
{@link ng.directive:ngInclude ngInclude},
37-
{@link ng.directive:ngRepeat ngRepeat},
35+
{@link directive:ngClick ngClick},
36+
{@link directive:ngInclude ngInclude},
37+
{@link directive:ngRepeat ngRepeat},
3838
etc… <br />
3939
</p>
4040
</td>

docs/content/error/sce/iequirks.ngdoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
This error occurs when you are using AngularJS with {@link api/ng.$sce Strict Contextual Escaping (SCE)} mode enabled (the default) on IE8 or lower in quirks mode.
77

88
In this mode, IE8 allows one to execute arbitrary javascript by the use of the `expression()` syntax and is not supported.
9-
Refer {@link http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx MSDN Blogs > IEBlog > Ending Expressions} to learn more about them.
9+
Refer
10+
[MSDN Blogs > IEBlog > Ending Expressions](http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx)
11+
to learn more about them.
1012

1113
To resolve this error please specify the proper doctype at the top of your main html document:
1214

docs/content/error/sce/insecurl.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ api/ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist}/ {@link
1919
api/ng.$sceDelegateProvider#methods_resourceUrlBlacklist blacklist} or wrap the URL with a call to {@link
2020
api/ng.$sce#methods_trustAsResourceUrl $sce.trustAsResourceUrl}.
2121

22-
**Note**: The browser's {@link
23-
https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest Same Origin
24-
Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing (CORS)} policy apply
22+
**Note**: The browser's [Same Origin
23+
Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) and
24+
[Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) policy apply
2525
that may further restrict whether the template is successfully loaded. (e.g. neither cross-domain
2626
requests won't work on all browsers nor `file://` requests on some browsers)

docs/content/guide/bootstrap.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ initialization.
2525

2626
* Place the `script` tag at the bottom of the page. Placing script tags at the end of the page
2727
improves app load time because the HTML loading is not blocked by loading of the `angular.js`
28-
script. You can get the latest bits from {@link http://code.angularjs.org}. Please don't link
28+
script. You can get the latest bits from http://code.angularjs.org. Please don't link
2929
your production code to this URL, as it will expose a security hole on your site. For
3030
experimental development linking to our site is fine.
3131
* Choose: `angular-[version].js` for a human-readable file, suitable for development and

docs/content/guide/controller.ngdoc

+69-69
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,36 @@ is registered.
2828
The following example shows a very simple constructor function for a Controller, `GreetingCtrl`,
2929
which attaches a `greeting` property containing the string `'Hola!'` to the `$scope`:
3030

31-
<pre>
31+
```
3232
function GreetingCtrl($scope) {
3333
$scope.greeting = 'Hola!';
3434
}
35-
</pre>
35+
```
3636

3737
Once the Controller has been attached to the DOM, the `greeting` property can be data-bound to the
3838
template:
3939

40-
<pre>
41-
<div ng-controller="GreetingCtrl">
42-
{{ greeting }}
43-
</div>
44-
</pre>
40+
```
41+
<div ng-controller="GreetingCtrl">
42+
{{ greeting }}
43+
</div>
44+
```
4545

4646
**NOTE**: Although Angular allows you to create Controller functions in the global scope, this is
4747
not recommended. In a real application you should use the `.controller` method of your
4848
{@link module Angular Module} for your application as follows:
4949

50-
<pre>
51-
var myApp = angular.module('myApp',[]);
50+
```
51+
var myApp = angular.module('myApp',[]);
5252

53-
myApp.controller('GreetingCtrl', ['$scope', function($scope) {
54-
$scope.greeting = 'Hola!';
55-
}]);
56-
</pre>
53+
myApp.controller('GreetingCtrl', ['$scope', function($scope) {
54+
$scope.greeting = 'Hola!';
55+
}]);
56+
```
5757

5858
We have used an **inline injection annotation** to explicitly specify the dependency
5959
of the Controller on the `$scope` service provided by Angular. See the guide on
60-
{@link http://docs.angularjs.org/guide/di Dependency Injection} for more information.
60+
[Dependency Injection](http://docs.angularjs.org/guide/di) for more information.
6161

6262

6363
# Adding Behavior to a Scope Object
@@ -68,22 +68,22 @@ then available to be called from the template/view.
6868

6969
The following example uses a Controller to add a method to the scope, which doubles a number:
7070

71-
<pre>
72-
var myApp = angular.module('myApp',[]);
71+
```
72+
var myApp = angular.module('myApp',[]);
7373

74-
myApp.controller('DoubleCtrl', ['$scope', function($scope) {
75-
$scope.double = function(value) { return value * 2; };
76-
}]);
77-
</pre>
74+
myApp.controller('DoubleCtrl', ['$scope', function($scope) {
75+
$scope.double = function(value) { return value * 2; };
76+
}]);
77+
```
7878

7979
Once the Controller has been attached to the DOM, the `double` method can be invoked in an Angular
8080
expression in the template:
8181

82-
<pre>
83-
<div ng-controller="DoubleCtrl">
84-
Two times <input ng-model="num"> equals {{ double(num) }}
85-
</div>
86-
</pre>
82+
```
83+
<div ng-controller="DoubleCtrl">
84+
Two times <input ng-model="num"> equals {{ double(num) }}
85+
</div>
86+
```
8787

8888
As discussed in the {@link concepts Concepts} section of this guide, any
8989
objects (or primitives) assigned to the scope become model properties. Any methods assigned to
@@ -134,30 +134,30 @@ The message in our template contains a binding to the `spice` model, which by de
134134
string "very". Depending on which button is clicked, the `spice` model is set to `chili` or
135135
`jalapeño`, and the message is automatically updated by data-binding.
136136

137-
<doc:example module="spicyApp1">
138-
<doc:source>
137+
<example module="spicyApp1">
138+
<file name="index.html">
139139
<div ng-app="spicyApp1" ng-controller="SpicyCtrl">
140140
<button ng-click="chiliSpicy()">Chili</button>
141141
<button ng-click="jalapenoSpicy()">Jalapeño</button>
142142
<p>The food is {{spice}} spicy!</p>
143143
</div>
144-
<script>
145-
var myApp = angular.module('spicyApp1', []);
146-
147-
myApp.controller('SpicyCtrl', ['$scope', function($scope){
148-
$scope.spice = 'very';
149-
150-
$scope.chiliSpicy = function() {
151-
$scope.spice = 'chili';
152-
};
153-
154-
$scope.jalapenoSpicy = function() {
155-
$scope.spice = 'jalapeño';
156-
};
157-
}]);
158-
</script>
159-
</doc:source>
160-
</doc:example>
144+
</file>
145+
<file name="app.js">
146+
var myApp = angular.module('spicyApp1', []);
147+
148+
myApp.controller('SpicyCtrl', ['$scope', function($scope){
149+
$scope.spice = 'very';
150+
151+
$scope.chiliSpicy = function() {
152+
$scope.spice = 'chili';
153+
};
154+
155+
$scope.jalapenoSpicy = function() {
156+
$scope.spice = 'jalapeño';
157+
};
158+
}]);
159+
</file>
160+
</example>
161161

162162
Things to notice in the example above:
163163

@@ -175,15 +175,16 @@ its children).
175175
Controller methods can also take arguments, as demonstrated in the following variation of the
176176
previous example.
177177

178-
<doc:example module="spicyApp2">
179-
<doc:source>
178+
<example module="spicyApp2">
179+
<file name="index.html">
180180
<div ng-app="spicyApp2" ng-controller="SpicyCtrl">
181181
<input ng-model="customSpice">
182182
<button ng-click="spicy('chili')">Chili</button>
183183
<button ng-click="spicy(customSpice)">Custom spice</button>
184184
<p>The food is {{spice}} spicy!</p>
185185
</div>
186-
<script>
186+
</file>
187+
<file name="app.js">
187188
var myApp = angular.module('spicyApp2', []);
188189

189190
myApp.controller('SpicyCtrl', ['$scope', function($scope){
@@ -194,9 +195,8 @@ previous example.
194195
$scope.spice = spice;
195196
};
196197
}]);
197-
</script>
198-
</doc:source>
199-
</doc:example>
198+
</file>
199+
</example>
200200

201201
Notice that the `SpicyCtrl` Controller now defines just one method called `spicy`, which takes one
202202
argument called `spice`. The template then refers to this Controller method and passes in a string
@@ -209,11 +209,11 @@ It is common to attach Controllers at different levels of the DOM hierarchy. Si
209209
{@link api/ng.directive:ngController ng-controller} directive creates a new child scope, we get a
210210
hierarchy of scopes that inherit from each other. The `$scope` that each Controller receives will
211211
have access to properties and methods defined by Controllers higher up the hierarchy.
212-
See {@link https://github.com/angular/angular.js/wiki/Understanding-Scopes Understanding Scopes} for
212+
See [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes) for
213213
more information about scope inheritance.
214214

215-
<doc:example module="scopeInheritance">
216-
<doc:source>
215+
<example module="scopeInheritance">
216+
<file name="index.html">
217217
<div ng-app="scopeInheritance" class="spicy">
218218
<div ng-controller="MainCtrl">
219219
<p>Good {{timeOfDay}}, {{name}}!</p>
@@ -227,13 +227,14 @@ more information about scope inheritance.
227227
</div>
228228
</div>
229229
</div>
230-
<style>
231-
div.spicy div {
232-
padding: 10px;
233-
border: solid 2px blue;
234-
}
235-
</style>
236-
<script>
230+
</file>
231+
<file name="app.css">
232+
div.spicy div {
233+
padding: 10px;
234+
border: solid 2px blue;
235+
}
236+
</file>
237+
<file name="app.js">
237238
var myApp = angular.module('scopeInheritance', []);
238239
myApp.controller('MainCtrl', ['$scope', function($scope){
239240
$scope.timeOfDay = 'morning';
@@ -246,9 +247,8 @@ more information about scope inheritance.
246247
$scope.timeOfDay = 'evening';
247248
$scope.name = 'Gingerbreak Baby';
248249
}]);
249-
</script>
250-
</doc:source>
251-
</doc:example>
250+
</file>
251+
</example>
252252

253253
Notice how we nested three `ng-controller` directives in our template. This will result in four
254254
scopes being created for our view:
@@ -270,7 +270,7 @@ Although there are many ways to test a Controller, one of the best conventions,
270270
involves injecting the {@link api/ng.$rootScope $rootScope} and {@link api/ng.$controller $controller}:
271271

272272
**Controller Definition:**
273-
<pre>
273+
```
274274
var myApp = angular.module('myApp',[]);
275275

276276
myApp.controller('MyController', function($scope) {
@@ -279,10 +279,10 @@ involves injecting the {@link api/ng.$rootScope $rootScope} and {@link api/ng.$c
279279
{"name":"habanero", "spiceness":"LAVA HOT!!"}];
280280
$scope.spice = "habanero";
281281
});
282-
</pre>
282+
```
283283

284284
**Controller Test:**
285-
<pre>
285+
```
286286
describe('myController function', function() {
287287

288288
describe('myController', function() {
@@ -304,13 +304,13 @@ describe('myController function', function() {
304304
});
305305
});
306306
});
307-
</pre>
307+
```
308308

309309

310310
If you need to test a nested Controller you need to create the same scope hierarchy
311311
in your test that exists in the DOM:
312312

313-
<pre>
313+
```
314314
describe('state', function() {
315315
var mainScope, childScope, grandChildScope;
316316

@@ -334,7 +334,7 @@ describe('state', function() {
334334
expect(grandChildScope.name).toBe('Gingerbreak Baby');
335335
});
336336
});
337-
</pre>
337+
```
338338

339339

340340

docs/content/guide/dev_guide.e2e-testing.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ the only button on the page, and then it verifies that there are 10 items listed
5555
The API section below lists the available commands and expectations for the Runner.
5656

5757
# API
58-
Source: {@link https://github.com/angular/angular.js/blob/master/src/ngScenario/dsl.js}
58+
Source: https://github.com/angular/angular.js/blob/master/src/ngScenario/dsl.js
5959

6060
## pause()
6161
Pauses the execution of the tests until you call `resume()` in the console (or click the resume
@@ -188,7 +188,7 @@ Executes the `method` passing in `key` and `value` on the element matching the g
188188
Matchers are used in combination with the `expect(...)` function as described above and can
189189
be negated with `not()`. For instance: `expect(element('h1').text()).not().toEqual('Error')`.
190190

191-
Source: {@link https://github.com/angular/angular.js/blob/master/src/ngScenario/matchers.js}
191+
Source: https://github.com/angular/angular.js/blob/master/src/ngScenario/matchers.js
192192

193193
<pre>
194194
// value and Object comparison following the rules of angular.equals().
@@ -222,7 +222,7 @@ expect(value).toBeGreaterThan(expected)
222222
</pre>
223223

224224
# Example
225-
See the {@link https://github.com/angular/angular-seed angular-seed} project for more examples.
225+
See the [angular-seed](https://github.com/angular/angular-seed) project for more examples.
226226

227227
## Conditional actions with element(...).query(fn)
228228

docs/content/guide/dev_guide.services.$location.ngdoc

+8-10
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
# What does it do?
66

7-
The `$location` service parses the URL in the browser address bar (based on the {@link
8-
https://developer.mozilla.org/en/window.location window.location}) and makes the URL available to
7+
The `$location` service parses the URL in the browser address bar (based on the [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL available to
98
your application. Changes to the URL in the address bar are reflected into $location service and
109
changes to $location are reflected into the browser address bar.
1110

@@ -145,7 +144,7 @@ unless `replace()` is called again.
145144

146145
### Setters and character encoding
147146
You can pass special characters to `$location` service and it will encode them according to rules
148-
specified in {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}. When you access the methods:
147+
specified in [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt). When you access the methods:
149148

150149
- All values that are passed to `$location` setter methods, `path()`, `search()`, `hash()`, are
151150
encoded.
@@ -160,7 +159,7 @@ encoded.
160159

161160
`$location` service has two configuration modes which control the format of the URL in the browser
162161
address bar: **Hashbang mode** (the default) and the **HTML5 mode** which is based on using the
163-
HTML5 {@link http://www.w3.org/TR/html5/browsers.html#history History API}. Applications use the same API in
162+
HTML5 [History API](http://www.w3.org/TR/html5/history.html). Applications use the same API in
164163
both modes and the `$location` service will work with appropriate URL segments and browser APIs to
165164
facilitate the browser URL change and history management.
166165

@@ -242,8 +241,8 @@ your document:
242241

243242
This will cause crawler bot to request links with `_escaped_fragment_` param so that your server
244243
can recognize the crawler and serve a HTML snapshots. For more information about this technique,
245-
see {@link http://code.google.com/web/ajaxcrawling/docs/specification.html Making AJAX Applications
246-
Crawlable}.
244+
see [Making AJAX Applications
245+
Crawlable](http://code.google.com/web/ajaxcrawling/docs/specification.html).
247246

248247
## HTML5 mode
249248

@@ -346,8 +345,8 @@ meta tag to the HEAD section of your document:
346345

347346
This statement causes a crawler to request links with an empty `_escaped_fragment_` parameter so that
348347
your server can recognize the crawler and serve it HTML snapshots. For more information about this
349-
technique, see {@link http://code.google.com/web/ajaxcrawling/docs/specification.html Making AJAX
350-
Applications Crawlable}.
348+
technique, see [Making AJAX
349+
Applications Crawlable](http://code.google.com/web/ajaxcrawling/docs/specification.html).
351350

352351
### Relative links
353352

@@ -625,8 +624,7 @@ then uses the information it obtains to compose hashbang URLs (such as
625624

626625
## Two-way binding to $location
627626

628-
The Angular's compiler currently does not support two-way binding for methods (see {@link
629-
https://github.com/angular/angular.js/issues/404 issue}). If you should require two-way binding
627+
The Angular's compiler currently does not support two-way binding for methods (see [issue](https://github.com/angular/angular.js/issues/404)). If you should require two-way binding
630628
to the $location object (using {@link api/ng.directive:input.text
631629
ngModel} directive on an input field), you will need to specify an extra model property
632630
(e.g. `locationPath`) with two watchers which push $location updates in both directions. For

0 commit comments

Comments
 (0)