Permalink
Comparing changes
Open a pull request
- 2 commits
- 36 files changed
- 0 commit comments
- 1 contributor
Commits on Oct 29, 2016
* a * allows * angularytics * animate * architecting * asynchronously * attribute * back * browser * callback * component * delimited * dependencies * dynamically * empty * encoded * explicitly * expression * fails * guarantees * hierarchy * highlight * identifiers * immediately * infinite * initialized * inputting * instance * interprets * linking * location * misformed * numerically * occurring * overridden * overwritten * parameters * Pluralsight * precedence * primitive * properly * prototypically * representation * response * separately * separator * should * specifying * supported * template * thrown * transclude * transclusion * transitions * trigger * useful
Unified
Split
Showing
with
100 additions
and 100 deletions.
- +15 −15 CHANGELOG.md
- +1 −1 docs/content/guide/animations.ngdoc
- +3 −3 docs/content/guide/component-router.ngdoc
- +2 −2 docs/content/guide/external-resources.ngdoc
- +2 −2 docs/content/guide/interpolation.ngdoc
- +3 −3 docs/content/guide/migration.ngdoc
- +1 −1 docs/content/misc/faq.ngdoc
- +1 −1 docs/content/tutorial/step_02.ngdoc
- +1 −1 docs/content/tutorial/step_09.ngdoc
- +1 −1 gdocs.js
- +2 −2 src/ng/compile.js
- +1 −1 src/ng/directive/input.js
- +1 −1 src/ngAnimate/animateChildrenDirective.js
- +1 −1 test/BinderSpec.js
- +4 −4 test/auto/injectorSpec.js
- +2 −2 test/ng/browserSpecs.js
- +12 −12 test/ng/compileSpec.js
- +8 −8 test/ng/directive/inputSpec.js
- +2 −2 test/ng/directive/selectSpec.js
- +2 −2 test/ng/directive/validatorsSpec.js
- +1 −1 test/ng/filter/orderBySpec.js
- +1 −1 test/ng/httpSpec.js
- +1 −1 test/ng/jsonpCallbacksSpec.js
- +1 −1 test/ng/locationSpec.js
- +3 −3 test/ng/parseSpec.js
- +12 −12 test/ng/qSpec.js
- +1 −1 test/ng/rafSpec.js
- +1 −1 test/ng/rootScopeSpec.js
- +1 −1 test/ngAnimate/animateSpec.js
- +1 −1 test/ngMessages/messagesSpec.js
- +2 −2 test/ngMock/angular-mocksSpec.js
- +2 −2 test/ngResource/resourceSpec.js
- +2 −2 test/ngSanitize/sanitizeSpec.js
- +1 −1 test/ngScenario/mocks.js
- +2 −2 test/ngTouch/directive/ngSwipeSpec.js
- +3 −3 test/ngTouch/swipeSpec.js
| @@ -231,7 +231,7 @@ elem.attr(booleanAttrName, null); | ||
| - **[4e3624](https://github.com/angular/angular.js/commit/4e3624552284d0e725bf6262b2e468cd2c7682fa)**: remove the attribute for `.attr(attribute, null)` | ||
|
|
||
| Invoking `elem.attr(attributeName, null)` would set the | ||
| `attributeName` atribute value to a string `"null"`, now it removes the | ||
| `attributeName` attribute value to a string `"null"`, now it removes the | ||
| attribute instead. | ||
|
|
||
| To migrate the code follow the example below: | ||
| @@ -595,7 +595,7 @@ ancestor. | ||
| It is possible that an `ngModelOptions` directive that does not set a property, | ||
| has an ancestor ngModelOptions that does set this property to a value other than | ||
| `undefined`. This would cause the `ngModel` and input controls below this `ngModelOptions` | ||
| directive to display different behaviour. This is fixed by explictly setting the | ||
| directive to display different behaviour. This is fixed by explicitly setting the | ||
| property in the `ngModelOptions` to prevent it from inheriting from the ancestor. | ||
|
|
||
| For example if you had the following HTML: | ||
| @@ -667,7 +667,7 @@ might have unexpectd side effects in the following cases: | ||
|
|
||
| ```js | ||
| // Assuming the following component: | ||
| .compoent('someThing', { | ||
| .component('someThing', { | ||
| template: '<ng-transclude><!-- Default content goes here --></ng-transclude>' | ||
| transclude: { | ||
| ignored: 'veryImportantContent' | ||
| @@ -2919,7 +2919,7 @@ the built-in pattern validator: | ||
| /** | ||
| * The built-in directive will call our overwritten validator | ||
| * (see below). We just need to update the regex. | ||
| * The preLink fn guaranetees our observer is called first. | ||
| * The preLink fn guarantees our observer is called first. | ||
| */ | ||
| if (isString(regex) && regex.length > 0) { | ||
| regex = new RegExp('^' + regex + '$'); | ||
| @@ -3035,7 +3035,7 @@ the built-in pattern validator: | ||
| /** | ||
| * The built-in directive will call our overwritten validator | ||
| * (see below). We just need to update the regex. | ||
| * The preLink fn guaranetees our observer is called first. | ||
| * The preLink fn guarantees our observer is called first. | ||
| */ | ||
| if (isString(regex) && regex.length > 0) { | ||
| regex = new RegExp('^' + regex + '$'); | ||
| @@ -4909,7 +4909,7 @@ behavior is undefined. | ||
| ([96c61fe7](https://github.com/angular/angular.js/commit/96c61fe756d7d3db011818bf0925e3d86ffff8ce), | ||
| [#10278](https://github.com/angular/angular.js/issues/10278)) | ||
| - **orderBy:** | ||
| - make object-to-primtiive behavior work for objects with null prototype | ||
| - make object-to-primitive behavior work for objects with null prototype | ||
| ([3aa57528](https://github.com/angular/angular.js/commit/3aa5752894419b4638d5c934879258fa6a1c0d07)) | ||
| - maintain order in array of objects when predicate is not provided | ||
| ([8bfeddb5](https://github.com/angular/angular.js/commit/8bfeddb5d671017f4a21b8b46334ac816710b143), | ||
| @@ -7066,7 +7066,7 @@ Closes #7336 | ||
|
|
||
|
|
||
| Previously, it was possible for an action passed to $watch | ||
| to be a string, interpreted as an angular expresison. This is no longer supported. | ||
| to be a string, interpreted as an angular expression. This is no longer supported. | ||
| The action now has to be a function. | ||
| Passing an action to $watch is still optional. | ||
|
|
||
| After: | ||
|
|
||
| ``` | ||
| // POST, PUT and PATCH default headers must be specified seperately, | ||
| // POST, PUT and PATCH default headers must be specified separately, | ||
| // as they do not share data. | ||
| $httpProvider.defaults.headers.post = | ||
| $httpProvider.defaults.headers.put = | ||
| ([31c56f54](https://github.com/angular/angular.js/commit/31c56f540045b5270f5b8e235873da855caf3486), | ||
| [#4145](https://github.com/angular/angular.js/issues/4145), | ||
| [#3964](https://github.com/angular/angular.js/issues/3964)) | ||
| - **ngTransclude:** detect ngTranslude usage without a transclusion directive | ||
| - **ngTransclude:** detect ngTransclude usage without a transclusion directive | ||
| ([5a1a6b86](https://github.com/angular/angular.js/commit/5a1a6b86a8dbcd8aa4fe9c59fad8d005eead686c), | ||
| [#3759](https://github.com/angular/angular.js/issues/3759)) | ||
|
|
||
| - ensure transition-property is not changed when only keyframe animations are in use | ||
| ([2df3c9f5](https://github.com/angular/angular.js/commit/2df3c9f58def9584455f7c4bfdabbd12aab58bf9), | ||
| [#3933](https://github.com/angular/angular.js/issues/3933)) | ||
| - avoid completing the animation asynchronously unless CSS transtiions/animations are present | ||
| - avoid completing the animation asynchronously unless CSS transitions/animations are present | ||
| ([2a63dfa6](https://github.com/angular/angular.js/commit/2a63dfa6cc7889888f4296fff2944e74ff30b3af), | ||
| [#4023](https://github.com/angular/angular.js/issues/4023), | ||
| [#3940](https://github.com/angular/angular.js/issues/3940)) | ||
|
|
||
| ## Features | ||
|
|
||
| - **$http:** support custom reponseType | ||
| - **$http:** support custom responseType | ||
| ([e0a54f6b](https://github.com/angular/angular.js/commit/e0a54f6b206dc2b6595f2bc3a17c5932e7477545), | ||
| [#1013](https://github.com/angular/angular.js/issues/1013)) | ||
| - **$interpolate:** | ||
| - allow defining route async dependencies as promises and defer route change until all promises | ||
| are resolved | ||
| ([885fb0dd](https://github.com/angular/angular.js/commit/885fb0dd0743859a8985c23e4d0c1855a2be711e)) | ||
| - rename template -> tempalteUrl and add support for inline templates | ||
| - rename template -> templateUrl and add support for inline templates | ||
| ([0a6e464a](https://github.com/angular/angular.js/commit/0a6e464a93d9a1e76a624b356054ce9ca4015f55)) | ||
| - **$compile:** simplify isolate scope bindings and introduce true two-way data-binding between | ||
| parent scope and isolate scope | ||
| ([c3a41ff9](https://github.com/angular/angular.js/commit/c3a41ff9fefe894663c4d4f40a83794521deb14f)) | ||
| - **$injector:** provide API for retrieving function annotations | ||
| ([4361efb0](https://github.com/angular/angular.js/commit/4361efb03b79e71bf0cea92b94ff377ed718bad4)) | ||
| - **$location:** add $locatonChange[start|success] event - since events are cancelable, it's now | ||
| - **$location:** add $locationChange[start|success] event - since events are cancelable, it's now | ||
| possible to cancel route and location changes. | ||
| ([92a2e180](https://github.com/angular/angular.js/commit/92a2e1807657c69e1372106b0727675a30f4cbd7)) | ||
| - **$rootElement:** expose application root element as $rootElement service | ||
| ([06d09550](https://github.com/angular/angular.js/commit/06d0955074f79de553cc34fbf945045dc458e064)) | ||
| - **booleanAttrs:** always convert the model to boolean before setting the element property | ||
| ([dcb8e076](https://github.com/angular/angular.js/commit/dcb8e0767fbf0a7a55f3b0045fd01b2532ea5441)) | ||
| - **form:** preperly clean up when invalid widget is removed | ||
| - **form:** properly clean up when invalid widget is removed | ||
| ([21b77ad5](https://github.com/angular/angular.js/commit/21b77ad5c231ab0e05eb89f22005f7ed8d40a6c1)) | ||
| - **ngHref:** copy even if no binding | ||
| ([2f5dba48](https://github.com/angular/angular.js/commit/2f5dba488e855bcdbb9304aa809efcb9de7b43e9)) | ||
| ([ee5a5352](https://github.com/angular/angular.js/commit/ee5a5352fd4b94cedee6ef20d4bf2d43ce77e00b), | ||
| [#806](https://github.com/angular/angular.js/issues/806)) | ||
| - **directives:** | ||
| - **select:** multiselect failes to update view on selection insert | ||
| - **select:** multiselect fails to update view on selection insert | ||
| ([6ecac8e7](https://github.com/angular/angular.js/commit/6ecac8e71a84792a434d21db2c245b3648c55f18)) | ||
| - **ngForm:** alias name||ngForm | ||
| ([823adb23](https://github.com/angular/angular.js/commit/823adb231995e917bc060bfa49453e2a96bac2b6)) | ||
| @@ -384,7 +384,7 @@ By default, any `ngAnimate` enabled directives will assume any transition / anim | ||
| element are part of an `ngAnimate` animation. This can lead to problems when the styles are actually | ||
| for animations that are independent of `ngAnimate`. | ||
|
|
||
| For example, an element acts as a loading spinner. It has an inifinite css animation on it, and also an | ||
| For example, an element acts as a loading spinner. It has an infinite css animation on it, and also an | ||
| {@link ngIf `ngIf`} directive, for which no animations are defined: | ||
|
|
||
| ```css | ||
| @@ -32,8 +32,8 @@ Here is a table of the main concepts used in the Component Router. | ||
| | Routing Component | An Angular component with a RouteConfig and an associated Router. | | ||
| | RouteDefinition | Defines how the router should navigate to a component based on a URL pattern. | | ||
| | ngOutlet | The directive (`<ng-outlet>`) that marks where the router should display a view. | | ||
| | ngLink | The directive (`ng-link="..."`) for binding a clickable HTML element to a route, via a Link Paramaters Array. | | ||
| | Link Parameters Array | An array that the router inteprets into a routing instruction. We can bind a RouterLink to that array or pass the array as an argument to the Router.navigate method. | | ||
| | ngLink | The directive (`ng-link="..."`) for binding a clickable HTML element to a route, via a Link Parameters Array. | | ||
| | Link Parameters Array | An array that the router interprets into a routing instruction. We can bind a RouterLink to that array or pass the array as an argument to the Router.navigate method. | | ||
|
|
||
|
|
||
| ## Component-based Applications | ||
| @@ -929,7 +929,7 @@ function HeroListComponent(heroService) { | ||
| } | ||
| ``` | ||
|
|
||
| Finally, we can use this information to higlight the current hero in the template. | ||
| Finally, we can use this information to highlight the current hero in the template. | ||
|
|
||
| ```html | ||
| <div ng-repeat="hero in $ctrl.heroes" | ||
| @@ -41,7 +41,7 @@ This is a collection of external, 3rd party resources for learning and developin | ||
| ##### General | ||
|
|
||
| * **Javascript minification: **[Background](http://thegreenpizza.github.io/2013/05/25/building-minification-safe-angular.js-applications/), [ng-annotate automation tool](https://github.com/olov/ng-annotate) | ||
| * **Analytics and Logging:** [Angularyitcs (Google Analytics)](http://ngmodules.org/modules/angularytics), [Angulartics (Analytics)](https://github.com/luisfarzati/angulartics), [Logging Client-Side Errors](http://www.bennadel.com/blog/2542-Logging-Client-Side-Errors-With-AngularJS-And-Stacktrace-js.htm) | ||
| * **Analytics and Logging:** [Angularytics (Google Analytics)](http://ngmodules.org/modules/angularytics), [Angulartics (Analytics)](https://github.com/luisfarzati/angulartics), [Logging Client-Side Errors](http://www.bennadel.com/blog/2542-Logging-Client-Side-Errors-With-AngularJS-And-Stacktrace-js.htm) | ||
| * **SEO:** [By hand](http://www.yearofmoo.com/2012/11/angularjs-and-seo.html), [prerender.io](http://prerender.io/), [Brombone](http://www.brombone.com/), [SEO.js](http://getseojs.com/), [SEO4Ajax](http://www.seo4ajax.com/) | ||
|
|
||
| ##### Server-Specific | ||
| @@ -137,7 +137,7 @@ You can find a larger list of Angular external libraries at [ngmodules.org](http | ||
| [CodeAcademy](http://www.codecademy.com/courses/javascript-advanced-en-2hJ3J/0/1), | ||
| [CodeSchool](https://www.codeschool.com/courses/shaping-up-with-angular-js) | ||
| * **Paid online:** | ||
| [Pluralsite (3 courses)](http://www.pluralsight.com/training/Courses/Find?highlight=true&searchTerm=angularjs), | ||
| [Pluralsight (3 courses)](http://www.pluralsight.com/training/Courses/Find?highlight=true&searchTerm=angularjs), | ||
| [Tuts+](https://tutsplus.com/course/easier-js-apps-with-angular/), | ||
| [lynda.com](http://www.lynda.com/AngularJS-tutorials/Up-Running-AngularJS/133318-2.html), | ||
| [WintellectNOW (4 lessons)](http://www.wintellectnow.com/Course/Detail/mastering-angularjs), | ||
| @@ -120,13 +120,13 @@ can be used with `ngAttr` instead. The following is a list of known problematic | ||
| ### Dynamically changing an interpolated value | ||
|
|
||
| You should avoid dynamically changing the content of an interpolated string (e.g. attribute value | ||
| or text node). Your changes are likely to be overwriten, when the original string gets evaluated. | ||
| or text node). Your changes are likely to be overwritten, when the original string gets evaluated. | ||
| This restriction applies to both directly changing the content via JavaScript or indirectly using a | ||
| directive. | ||
|
|
||
| For example, you should not use interpolation in the value of the `style` attribute (e.g. | ||
| `style="color: {{ 'orange' }}; font-weight: {{ 'bold' }};"`) **and** at the same time use a | ||
| directive that changes the content of that attributte, such as `ngStyle`. | ||
| directive that changes the content of that attribute, such as `ngStyle`. | ||
|
|
||
| ### Embedding interpolation markup inside expressions | ||
|
|
||
| @@ -33,7 +33,7 @@ which drives many of these changes. | ||
| ## Migrating from 1.4 to 1.5 | ||
|
|
||
| Angular 1.5 takes a big step towards preparing developers for a smoother transition to Angular 2 in | ||
| the future. Architecturing your applications using components, multi-slot transclusion, one-way | ||
| the future. Architecting your applications using components, multi-slot transclusion, one-way | ||
| bindings in isolate scopes, using lifecycle hooks in directive controllers and relying on native ES6 | ||
| features (such as classes and arrow functions) are now all possible with Angular 1.5. | ||
|
|
||
| @@ -605,7 +605,7 @@ The new API on `$cookies` is as follows: | ||
| * `getAll` | ||
| * `remove` | ||
|
|
||
| You must explictly use the methods above in order to access cookie data. This also means that | ||
| You must explicitly use the methods above in order to access cookie data. This also means that | ||
| you can no longer watch the properties on `$cookies` to detect changes | ||
| that occur on the browsers cookies. | ||
|
|
||
| @@ -1129,7 +1129,7 @@ app. This is no longer possible within a single module. | ||
|
|
||
| - due to [a097aa95](https://github.com/angular/angular.js/commit/a097aa95b7c78beab6d1b7d521c25f7d9d7843d9), | ||
| `orderBy` now treats `null` values (which in JavaScript have type `object`) as having a string | ||
| represenation of `'null'`. | ||
| representation of `'null'`. | ||
|
|
||
|
|
||
| ### Animation (`ngAnimate`) | ||
| @@ -247,7 +247,7 @@ If you want to apply a directive to each inner piece of the repeat, put it on a | ||
|
|
||
| ### `$rootScope` exists, but it can be used for evil | ||
|
|
||
| Scopes in Angular form a hierarchy, prototypally inheriting from a root scope at the top of the tree. | ||
| Scopes in Angular form a hierarchy, prototypically inheriting from a root scope at the top of the tree. | ||
| Usually this can be ignored, since most views have a controller, and therefore a scope, of their own. | ||
|
|
||
| Occasionally there are pieces of data that you want to make global to the whole app. | ||
| @@ -135,7 +135,7 @@ To learn more about Angular scopes, see the {@link ng.$rootScope.Scope angular s | ||
|
|
||
| <div class="alert alert-warning"> | ||
| <p> | ||
| Angular scopes prototypally inherit from their parent scope, all the way up to the *root scope* | ||
| Angular scopes prototypically inherit from their parent scope, all the way up to the *root scope* | ||
| of the application. As a result, assigning values directly on the scope makes it easy to share | ||
| data across different parts of the page and create interactive applications. | ||
| While this approach works for prototypes and smaller applications, it quickly leads to tight | ||
| @@ -324,7 +324,7 @@ modularity. | ||
|
|
||
| The takeaway here is: | ||
|
|
||
| * Always be explicit about the dependecies of a sub-module. Do not rely on dependencies inherited | ||
| * Always be explicit about the dependencies of a sub-module. Do not rely on dependencies inherited | ||
| from a parent module (because that parent module might not be there some day). | ||
|
|
||
| <div class="alert alert-success"> | ||
| @@ -39,7 +39,7 @@ if (flag === '--login') { | ||
| } | ||
|
|
||
| function help() { | ||
| console.log('Synopsys'); | ||
| console.log('Synopsis'); | ||
| console.log('gdocs.js --login <username>'); | ||
| console.log('gdocs.js --fetch [<docs collection>]'); | ||
| process.exit(-1); | ||
| @@ -402,7 +402,7 @@ | ||
| * * defines the parent to which the `cloneLinkingFn` will add the cloned elements. | ||
| * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`. | ||
| * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements) | ||
| * and when the `cloneLinkinFn` is passed, | ||
| * and when the `cloneLinkingFn` is passed, | ||
| * as those elements need to created and cloned in a special way when they are defined outside their | ||
| * usual containers (e.g. like `<svg>`). | ||
| * * See also the `directive.templateNamespace` property. | ||
| @@ -2222,7 +2222,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { | ||
| } | ||
|
|
||
| /** | ||
| * Given a node with an directive-start it collects all of the siblings until it finds | ||
| * Given a node with a directive-start it collects all of the siblings until it finds | ||
| * directive-end. | ||
| * @param node | ||
| * @param attrStart | ||
| @@ -1234,7 +1234,7 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) { | ||
| function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) { | ||
| var type = lowercase(element[0].type); | ||
|
|
||
| // In composition mode, users are still inputing intermediate text buffer, | ||
| // In composition mode, users are still inputting intermediate text buffer, | ||
| // hold the listener until composition is done. | ||
| // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent | ||
| if (!$sniffer.android) { | ||
| @@ -12,7 +12,7 @@ | ||
| * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move` | ||
| * (structural) animation, child elements that also have an active structural animation are not animated. | ||
| * | ||
| * Note that even if `ngAnimteChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation). | ||
| * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation). | ||
| * | ||
| * | ||
| * @param {string} ngAnimateChildren If the value is empty, `true` or `on`, | ||
| @@ -357,7 +357,7 @@ describe('Binder', function() { | ||
| }); | ||
| }); | ||
|
|
||
| it('ShoulIgnoreVbNonBindable', inject(function($rootScope, $compile) { | ||
| it('ShouldIgnoreVbNonBindable', inject(function($rootScope, $compile) { | ||
| element = $compile( | ||
| '<div>{{a}}' + | ||
| '<div ng-non-bindable>{{a}}</div>' + | ||
| @@ -124,7 +124,7 @@ describe('injector', function() { | ||
| expect($injector).not.toBe(providerInjector); | ||
| })); | ||
|
|
||
| it('should have an false strictDi property', inject(function($injector) { | ||
| it('should have a false strictDi property', inject(function($injector) { | ||
| expect($injector.strictDi).toBe(false); | ||
| })); | ||
|
|
||
| @@ -192,7 +192,7 @@ describe('injector', function() { | ||
|
|
||
|
|
||
| it('should create $inject', function() { | ||
| var extraParans = angular.noop; | ||
| var extraParams = angular.noop; | ||
| /* eslint-disable space-before-function-paren */ | ||
| // keep the multi-line to make sure we can handle it | ||
| function $f_n0 /* | ||
| @@ -203,7 +203,7 @@ describe('injector', function() { | ||
| function(a, b) {} | ||
| */ | ||
| _c, | ||
| /* {some type} */ d) { extraParans(); } | ||
| /* {some type} */ d) { extraParams(); } | ||
| /* eslint-enable */ | ||
| expect(annotate($f_n0)).toEqual(['$a', 'b_', '_c', 'd']); | ||
| expect($f_n0.$inject).toEqual(['$a', 'b_', '_c', 'd']); | ||
| @@ -944,7 +944,7 @@ describe('injector', function() { | ||
| }); | ||
|
|
||
|
|
||
| it('should throw usefull error on wrong argument type]', function() { | ||
| it('should throw useful error on wrong argument type]', function() { | ||
| expect(function() { | ||
| $injector.invoke({}); | ||
| }).toThrowMinErr('ng', 'areq', 'Argument \'fn\' is not a function, got Object'); | ||
Oops, something went wrong.