diff --git a/LICENSE b/LICENSE index b6ad6d3f0e3b..f2d3ff7a2081 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2010 Adam Abrons and Misko Hevery http://getangular.com +Copyright (c) 2010-2012 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/images/logo/AngularShieldLogo.graffle/QuickLook/Preview.pdf b/images/logo/AngularShieldLogo.graffle/QuickLook/Preview.pdf new file mode 100644 index 000000000000..936c017d4c08 Binary files /dev/null and b/images/logo/AngularShieldLogo.graffle/QuickLook/Preview.pdf differ diff --git a/images/logo/AngularShieldLogo.graffle/QuickLook/Thumbnail.tiff b/images/logo/AngularShieldLogo.graffle/QuickLook/Thumbnail.tiff new file mode 100644 index 000000000000..a3e6c6f2a25a Binary files /dev/null and b/images/logo/AngularShieldLogo.graffle/QuickLook/Thumbnail.tiff differ diff --git a/images/logo/AngularShieldLogo.graffle/data.plist b/images/logo/AngularShieldLogo.graffle/data.plist new file mode 100644 index 000000000000..4f202ee3cfcb Binary files /dev/null and b/images/logo/AngularShieldLogo.graffle/data.plist differ diff --git a/images/logo/AngularShieldLogo.graffle/image1.png b/images/logo/AngularShieldLogo.graffle/image1.png new file mode 100644 index 000000000000..119e24ad4b95 Binary files /dev/null and b/images/logo/AngularShieldLogo.graffle/image1.png differ diff --git a/images/logo/AngularShieldLogo.graffle/image2.png b/images/logo/AngularShieldLogo.graffle/image2.png new file mode 100644 index 000000000000..cd8575773008 Binary files /dev/null and b/images/logo/AngularShieldLogo.graffle/image2.png differ diff --git a/src/Angular.js b/src/Angular.js index 86a7fc1ccdb7..86689c0b0b98 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -2,9 +2,6 @@ //////////////////////////////////// -if (typeof document.getAttribute == 'undefined') - document.getAttribute = function() {}; - /** * @ngdoc function * @name angular.lowercase diff --git a/src/angular-bootstrap.js b/src/angular-bootstrap.js index 716731a518c3..50211416c4c7 100644 --- a/src/angular-bootstrap.js +++ b/src/angular-bootstrap.js @@ -2,7 +2,7 @@ /** * @license AngularJS - * (c) 2010-2011 AngularJS http://angularjs.org + * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, document) { diff --git a/src/angular.prefix b/src/angular.prefix index d66c099f12c1..7a6ff34416c0 100644 --- a/src/angular.prefix +++ b/src/angular.prefix @@ -1,6 +1,6 @@ /** * @license AngularJS v"NG_VERSION_FULL" - * (c) 2010-2012 AngularJS http://angularjs.org + * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, document, undefined) { diff --git a/src/loader.prefix b/src/loader.prefix index b3969eb08b9b..3ab7dd06e4fe 100644 --- a/src/loader.prefix +++ b/src/loader.prefix @@ -1,6 +1,6 @@ /** * @license AngularJS v"NG_VERSION_FULL" - * (c) 2010-2012 AngularJS http://angularjs.org + * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ 'use strict'; diff --git a/src/module.prefix b/src/module.prefix index 923679619184..5e94be5d47ee 100644 --- a/src/module.prefix +++ b/src/module.prefix @@ -1,6 +1,6 @@ /** * @license AngularJS v"NG_VERSION_FULL" - * (c) 2010-2012 AngularJS http://angularjs.org + * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(angular) { diff --git a/src/ng/compiler.js b/src/ng/compiler.js index e4491723475f..11cf0a6a8d96 100644 --- a/src/ng/compiler.js +++ b/src/ng/compiler.js @@ -467,12 +467,17 @@ function $CompileProvider($provide) { addTextInterpolateDirective(directives, node.nodeValue); break; case 8: /* Comment */ - match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue); - if (match) { - nName = directiveNormalize(match[1]); - if (addDirective(directives, nName, 'M', maxPriority)) { - attrs[nName] = trim(match[2]); + try { + match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue); + if (match) { + nName = directiveNormalize(match[1]); + if (addDirective(directives, nName, 'M', maxPriority)) { + attrs[nName] = trim(match[2]); + } } + } catch (e) { + // turns out that under some circumstances IE9 throws errors when one attempts to read comment's node value. + // Just ignore it and continue. (Can't seem to reproduce in test case.) } break; } diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 82402ae850a9..2ddd3337f0ad 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -14,7 +14,7 @@ * * Once scenario in which the use of `ngBind` is prefered over `{{ expression }}` binding is when * it's desirable to put bindings into template that is momentarily displayed by the browser in its - * raw state before Angular compiles it. Since `ngBind` is an element attribute, it makes make the + * raw state before Angular compiles it. Since `ngBind` is an element attribute, it makes the * bindings invisible to the user while the page is loading. * * An alternative solution to this problem would be using the diff --git a/src/ng/directive/script.js b/src/ng/directive/script.js index dcbd97b18a7e..79f8b26e206a 100644 --- a/src/ng/directive/script.js +++ b/src/ng/directive/script.js @@ -35,8 +35,11 @@ var scriptDirective = ['$templateCache', function($templateCache) { terminal: true, compile: function(element, attr) { if (attr.type == 'text/ng-template') { - var templateUrl = attr.id; - $templateCache.put(templateUrl, element.text()); + var templateUrl = attr.id, + // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent + text = element[0].text; + + $templateCache.put(templateUrl, text); } } }; diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index 4478f389ba01..0d14978a1c36 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1111,6 +1111,20 @@ function createHttpBackendMock($delegate, $browser) { * request is handled. */ + /** + * @ngdoc method + * @name angular.module.ngMock.$httpBackend#expectPATCH + * @methodOf angular.module.ngMock.$httpBackend + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + /** * @ngdoc method * @name angular.module.ngMock.$httpBackend#expectJSONP @@ -1220,7 +1234,7 @@ function createHttpBackendMock($delegate, $browser) { } }); - angular.forEach(['PUT', 'POST'], function(method) { + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { $httpBackend[prefix + method] = function(url, data, headers) { return $httpBackend[prefix](method, url, data, headers) } @@ -1483,6 +1497,20 @@ angular.module('ngMockE2E', ['ng']).config(function($provide) { * control how a matched request is handled. */ +/** + * @ngdoc method + * @name angular.module.ngMockE2E.$httpBackend#whenPATCH + * @methodOf angular.module.ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + /** * @ngdoc method * @name angular.module.ngMockE2E.$httpBackend#whenJSONP diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index db1984010fcc..d19a1d6a6aee 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -318,7 +318,7 @@ angular.module('ngResource', ['ng']). } forEach(actions, function(action, name) { - var isPostOrPut = action.method == 'POST' || action.method == 'PUT'; + var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH'; Resource[name] = function(a1, a2, a3, a4) { var params = {}; var data; @@ -349,7 +349,7 @@ angular.module('ngResource', ['ng']). } case 1: if (isFunction(a1)) success = a1; - else if (isPostOrPut) data = a1; + else if (hasBody) data = a1; else params = a1; break; case 0: break; @@ -409,7 +409,7 @@ angular.module('ngResource', ['ng']). throw "Expected between 1-3 arguments [params, success, error], got " + arguments.length + " arguments."; } - var data = isPostOrPut ? this : undefined; + var data = hasBody ? this : undefined; Resource[name].call(this, params, data, success, error); }; }); diff --git a/src/ngScenario/angular.prefix b/src/ngScenario/angular.prefix index 439ce37170ae..e9c15a4d2f30 100644 --- a/src/ngScenario/angular.prefix +++ b/src/ngScenario/angular.prefix @@ -1,6 +1,6 @@ /** * @license AngularJS v"NG_VERSION_FULL" - * (c) 2010-2011 AngularJS http://angularjs.org + * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, document){ diff --git a/src/ngScenario/jstd-scenario-adapter/angular.prefix b/src/ngScenario/jstd-scenario-adapter/angular.prefix index 87c1427060ff..0c86d3cd9c3f 100644 --- a/src/ngScenario/jstd-scenario-adapter/angular.prefix +++ b/src/ngScenario/jstd-scenario-adapter/angular.prefix @@ -1,6 +1,6 @@ /** * @license AngularJS v"NG_VERSION_FULL" - * (c) 2010-2011 AngularJS http://angularjs.org + * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window) { diff --git a/test/ng/directive/scriptSpec.js b/test/ng/directive/scriptSpec.js index 471e04ce0c66..73128765a9a2 100644 --- a/test/ng/directive/scriptSpec.js +++ b/test/ng/directive/scriptSpec.js @@ -11,10 +11,6 @@ describe('scriptDirective', function() { it('should populate $templateCache with contents of a ng-template script element', inject( function($compile, $templateCache) { - if (msie <=8) return; - // in ie8 it is not possible to create a script tag with the right content. - // it always comes up as empty. I was trying to set the text of the - // script tag, but that did not work either, so I gave up. $compile('