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

Commit 9dbef0f

Browse files
committed
Merge branch 'master' of https://github.com/angular/angular.js into add-offset-to-$anchorScroll
2 parents f45b82e + 613d0a3 commit 9dbef0f

34 files changed

+502
-520
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ caused by incorrect application logic and not by the user.
115115
## Bug Fixes
116116

117117

118-
- **$compile:** Resolve leak with asynchronous compilation
119-
([5c9c1973](https://github.com/angular/angular.js/commit/5c9c19730526d5df6f16c523e578e5305f3796d0),
120-
[#9199](https://github.com/angular/angular.js/issues/9199), [#9079](https://github.com/angular/angular.js/issues/9079), [#8504](https://github.com/angular/angular.js/issues/8504), [#9197](https://github.com/angular/angular.js/issues/9197))
118+
121119
- **select:** make ctrl.hasOption method consistent
122120
([11d2242d](https://github.com/angular/angular.js/commit/11d2242df65b2ade0dabe366a0c42963b6d37df5),
123121
[#8761](https://github.com/angular/angular.js/issues/8761))

docs/config/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module.exports = new Package('angularjs', [
103103

104104
computePathsProcessor.pathTemplates.push({
105105
docTypes: ['indexPage'],
106-
getPath: function() {},
106+
pathTemplate: '.',
107107
outputPathTemplate: '${id}.html'
108108
});
109109

@@ -131,6 +131,12 @@ module.exports = new Package('angularjs', [
131131
});
132132
})
133133

134+
.config(function(checkAnchorLinksProcessor) {
135+
checkAnchorLinksProcessor.base = '/';
136+
// We are only interested in docs that have an area (i.e. they are pages)
137+
checkAnchorLinksProcessor.checkDoc = function(doc) { return doc.area; };
138+
})
139+
134140

135141
.config(function(
136142
generateIndexPagesProcessor,

docs/config/services/gitData.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
var gruntUtils = require('../../../lib/grunt/utils');
43
var versionInfo = require('../../../lib/versions/version-info');
54

65
/**

docs/content/error/$httpBackend/noxhr.ngdoc

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/content/guide/index.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This is a short list of libraries with specific support and documentation for wo
9090

9191
* **Django:** [Tutorial](http://blog.mourafiq.com/post/55034504632/end-to-end-web-app-with-django-rest-framework), [Integrating AngularJS with Django](http://django-angular.readthedocs.org/en/latest/integration.html), [Getting Started with Django Rest Framework and AngularJS](http://blog.kevinastone.com/getting-started-with-django-rest-framework-and-angularjs.html)
9292
* **FireBase:** [AngularFire](http://angularfire.com/), [Realtime Apps with AngularJS and FireBase (video)](http://www.youtube.com/watch?v=C7ZI7z7qnHU)
93-
* **Google Cloud Platform: **[with Cloud Endpoints](https://cloud.google.com/resources/articles/angularjs-cloud-endpoints-recipe-for-building-modern-web-applications), [with Go](https://github.com/GoogleCloudPlatform/appengine-angular-gotodos)
93+
* **Google Cloud Platform: **[with Cloud Endpoints](https://cloud.google.com/developers/articles/angularjs-cloud-endpoints-recipe-for-building-modern-web-applications/), [with Go](https://github.com/GoogleCloudPlatform/appengine-angular-gotodos)
9494
* **Hood.ie:** [60 Minutes to Awesome](http://www.roberthorvick.com/2013/06/30/todomvc-angularjs-hood-ie-60-minutes-to-awesome/)
9595
* **MEAN Stack: **[Blog post](http://blog.mongodb.org/post/49262866911/the-mean-stack-mongodb-expressjs-angularjs-and), [Setup](http://thecodebarbarian.wordpress.com/2013/07/22/introduction-to-the-mean-stack-part-one-setting-up-your-tools/), [GDL Video](https://developers.google.com/live/shows/913996610)
9696
* **Rails: **[Tutorial](http://coderberry.me/blog/2013/04/22/angularjs-on-rails-4-part-1/), [AngularJS with Rails4](https://shellycloud.com/blog/2013/10/how-to-integrate-angularjs-with-rails-4), [angularjs-rails](https://github.com/hiravgandhi/angularjs-rails)

docs/content/guide/introduction.ngdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template
1010
language and lets you extend HTML's syntax to express your application's components clearly and
1111
succinctly. Angular's data binding and dependency injection eliminate much of the code you
12-
currently have to write. And it all happens within the browser, making it
12+
would otherwise have to write. And it all happens within the browser, making it
1313
an ideal partner with any server technology.
1414

1515
Angular is what HTML would have been had it been designed for applications. HTML is a great
@@ -103,7 +103,7 @@ Angular frees you from the following pains:
103103
* **Writing tons of initialization code just to get started:** Typically you need to write a lot
104104
of plumbing just to get a basic "Hello World" AJAX app working. With Angular you can bootstrap
105105
your app easily using services, which are auto-injected into your application in a
106-
[Guice](http://code.google.com/p/google-guice/)-like dependency-injection style. This allows you
106+
[Guice](https://github.com/google/guice)-like dependency-injection style. This allows you
107107
to get started developing features quickly. As a bonus, you get full control over the
108108
initialization process in automated tests.
109109

docs/content/misc/faq.ngdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ So it's definitely not a plugin or some other native browser extension.
2222

2323
### Is AngularJS a templating system?
2424

25-
At the highest level, Angular does look like a just another templating system. But there is one
25+
At the highest level, Angular does look like just another templating system. But there is one
2626
important reason why the Angular templating system is different, that makes it very good fit for
2727
application development: bidirectional data binding. The template is compiled in the browser and
2828
the compilation step produces a live view. This means you, the developers, don't need to write
@@ -39,7 +39,7 @@ for server-side communication.
3939

4040
AngularJS was designed to be compatible with other security measures like Content Security Policy
4141
(CSP), HTTPS (SSL/TLS) and server-side authentication and authorization that greatly reduce the
42-
possible attack vectors and we highly recommended their use.
42+
possible attack vectors and we highly recommend their use.
4343

4444

4545
### Can I download the source, build, and host the AngularJS environment locally?

npm-shrinkwrap.json

Lines changed: 37 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/bower/publish.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ function prepare {
7373
cd $TMP_DIR/bower-$repo
7474
replaceJsonProp "bower.json" "version" ".*" "$NEW_VERSION"
7575
replaceJsonProp "bower.json" "angular.*" ".*" "$NEW_VERSION"
76+
replaceJsonProp "package.json" "version" ".*" "$NEW_VERSION"
77+
replaceJsonProp "package.json" "angular.*" ".*" "$NEW_VERSION"
7678

7779
git add -A
7880

@@ -90,6 +92,18 @@ function publish {
9092
cd $TMP_DIR/bower-$repo
9193
git push origin master
9294
git push origin v$NEW_VERSION
95+
96+
# don't publish every build to npm
97+
if [ "${NEW_VERSION/+sha}" = "$NEW_VERSION" ] ; then
98+
if [ "${NEW_VERSION/-}" = "$NEW_VERSION" ] ; then
99+
# publish releases as "latest"
100+
npm publish
101+
else
102+
# publish prerelease builds with the beta tag
103+
npm publish --tag=beta
104+
fi
105+
fi
106+
93107
cd $SCRIPT_DIR
94108
done
95109
}

scripts/code.angularjs.org/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Script for updating code.angularjs.org repo from current local build.
44

55
echo "#################################"
6-
echo "## Update code.angular.js.org ###"
6+
echo "## Update code.angularjs.org ###"
77
echo "#################################"
88

99
ARG_DEFS=(

src/auto/injector.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
* @kind function
88
*
99
* @description
10-
* Creates an injector function that can be used for retrieving services as well as for
10+
* Creates an injector object that can be used for retrieving services as well as for
1111
* dependency injection (see {@link guide/di dependency injection}).
1212
*
1313
1414
* @param {Array.<string|Function>} modules A list of module functions or their aliases. See
1515
* {@link angular.module}. The `ng` module must be explicitly added.
16-
* @returns {function()} Injector function. See {@link auto.$injector $injector}.
16+
* @returns {function()} Injector object. See {@link auto.$injector $injector}.
1717
*
1818
* @example
1919
* Typical usage
@@ -120,7 +120,6 @@ function annotate(fn, strictDi, name) {
120120
/**
121121
* @ngdoc service
122122
* @name $injector
123-
* @kind function
124123
*
125124
* @description
126125
*
@@ -202,8 +201,8 @@ function annotate(fn, strictDi, name) {
202201
* @description
203202
* Allows the user to query if the particular service exists.
204203
*
205-
* @param {string} Name of the service to query.
206-
* @returns {boolean} returns true if injector has given service.
204+
* @param {string} name Name of the service to query.
205+
* @returns {boolean} `true` if injector has given service.
207206
*/
208207

209208
/**

src/ng/compile.js

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,37 +1356,35 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
13561356
var attrEndName = false;
13571357

13581358
attr = nAttrs[j];
1359-
if (!msie || msie >= 8 || attr.specified) {
1360-
name = attr.name;
1361-
value = trim(attr.value);
1362-
1363-
// support ngAttr attribute binding
1364-
ngAttrName = directiveNormalize(name);
1365-
if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
1366-
name = snake_case(ngAttrName.substr(6), '-');
1367-
}
1359+
name = attr.name;
1360+
value = trim(attr.value);
13681361

1369-
var directiveNName = ngAttrName.replace(/(Start|End)$/, '');
1370-
if (directiveIsMultiElement(directiveNName)) {
1371-
if (ngAttrName === directiveNName + 'Start') {
1372-
attrStartName = name;
1373-
attrEndName = name.substr(0, name.length - 5) + 'end';
1374-
name = name.substr(0, name.length - 6);
1375-
}
1376-
}
1362+
// support ngAttr attribute binding
1363+
ngAttrName = directiveNormalize(name);
1364+
if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
1365+
name = snake_case(ngAttrName.substr(6), '-');
1366+
}
13771367

1378-
nName = directiveNormalize(name.toLowerCase());
1379-
attrsMap[nName] = name;
1380-
if (isNgAttr || !attrs.hasOwnProperty(nName)) {
1381-
attrs[nName] = value;
1382-
if (getBooleanAttrName(node, nName)) {
1383-
attrs[nName] = true; // presence means true
1384-
}
1368+
var directiveNName = ngAttrName.replace(/(Start|End)$/, '');
1369+
if (directiveIsMultiElement(directiveNName)) {
1370+
if (ngAttrName === directiveNName + 'Start') {
1371+
attrStartName = name;
1372+
attrEndName = name.substr(0, name.length - 5) + 'end';
1373+
name = name.substr(0, name.length - 6);
13851374
}
1386-
addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);
1387-
addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
1388-
attrEndName);
13891375
}
1376+
1377+
nName = directiveNormalize(name.toLowerCase());
1378+
attrsMap[nName] = name;
1379+
if (isNgAttr || !attrs.hasOwnProperty(nName)) {
1380+
attrs[nName] = value;
1381+
if (getBooleanAttrName(node, nName)) {
1382+
attrs[nName] = true; // presence means true
1383+
}
1384+
}
1385+
addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);
1386+
addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
1387+
attrEndName);
13901388
}
13911389

13921390
// use class as directive
@@ -2293,6 +2291,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
22932291
"ng- versions (such as ng-click instead of onclick) instead.");
22942292
}
22952293

2294+
// If the attribute was removed, then we are done
2295+
if (!attr[name]) {
2296+
return;
2297+
}
2298+
22962299
// we need to interpolate again, in case the attribute value has been updated
22972300
// (e.g. by another directive's compile function)
22982301
interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),

src/ng/directive/a.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,6 @@
1616
var htmlAnchorDirective = valueFn({
1717
restrict: 'E',
1818
compile: function(element, attr) {
19-
20-
if (msie <= 8) {
21-
22-
// turn <a href ng-click="..">link</a> into a stylable link in IE
23-
// but only if it doesn't have name attribute, in which case it's an anchor
24-
if (!attr.href && !attr.name) {
25-
attr.$set('href', '');
26-
}
27-
28-
// add a comment node to anchors to workaround IE bug that causes element content to be reset
29-
// to new attribute content if attribute is updated with value containing @ and element also
30-
// contains value with @
31-
// see issue #1949
32-
element.append(document.createComment('IE fix'));
33-
}
34-
3519
if (!attr.href && !attr.xlinkHref && !attr.name) {
3620
return function(scope, element) {
3721
// SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.

src/ng/directive/ngBind.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate
145145
* element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link
146146
* ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize`
147147
* is available, for example, by including {@link ngSanitize} in your module's dependencies (not in
148-
* core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to
148+
* core Angular). In order to use {@link ngSanitize} in your module's dependencies, you need to
149+
* include "angular-sanitize.js" in your application.
150+
*
151+
* You may also bypass sanitization for values you know are safe. To do so, bind to
149152
* an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example
150153
* under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.
151154
*

src/ng/directive/ngIf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
* and `leave` effects.
3434
*
3535
* @animations
36-
* enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container
37-
* leave - happens just before the ngIf contents are removed from the DOM
36+
* enter - happens just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container
37+
* leave - happens just before the `ngIf` contents are removed from the DOM
3838
*
3939
* @element ANY
4040
* @scope

0 commit comments

Comments
 (0)