Tag: v1.3.20
-
chore(check-node-modules): make check/reinstall node_modules work acr…
…oss platforms The previous implementations (based on shell scripts) threw errors on Windows, because it was not able to `rm -rf` 'node_modules' (due to the 255 character limit in file-paths). This implementation works consistently across platforms and is heavily based on 'https://github.com/angular/angular/blob/3b9c08676a4c921bbfa847802e08566fb601ba7a/tools/npm/check-node-modules.js'. Fixes #11143 Closes #11353 Closes #12792
-
-
build(travis): gracefully shut down the sauce connect tunnel after th…
…e tests are done running This is to prevent sauce connect tunnel leaks. Closes #12921
-
-
fix($parse): do not convert to string computed properties multiple times
Do not convert to string properties multiple times.
-
chore(bower/publish): move DIST_TAG so that it gets the correct value
petebacondarwin committedSep 16, 2015 In the position that DIST_TAG was being assigned it was trying to get the `distTag` value from the wrong (i.e. a bower-...) repository.
-
fix($parse): throw error when accessing a restricted property indirectly
When accessing an instance thru a computed member and the property is an array, then also check the string value of the array. Closes #12833
-
-
fix($location): don't crash if navigating outside the app base
petebacondarwin committedJul 16, 2015 Previously, if you navigate outside of the Angular application, say be clicking the back button, the $location service would try to handle the url change and error due to the URL not being valid for the application. This fixes that issue by ensuring that a reload happens when you navigate to a URL that is not within the application. Closes #11667
-
refactor($location): compute `appBaseNoFile` only once
petebacondarwin committedJul 16, 2015
-
fix(ngModel): validate pattern against the viewValue
Since the HTML5 pattern validation constraint validates the input value, we should also validate against the viewValue. While this worked in core up to Angular 1.2, in 1.3, we changed not only validation, but the way `input[date]` and `input[number]` are handled - they parse their input values into `Date` and `Number` respectively, which cannot be validated by a regex. Fixes #12344 BREAKING CHANGE: The `ngPattern` and `pattern` directives will validate the regex against the `viewValue` of `ngModel`, i.e. the value of the model before the $parsers are applied. Previously, the modelValue (the result of the $parsers) was validated. This fixes issues where `input[date]` and `input[number]` cannot be validated because the viewValue string is parsed into `Date` and `Number` respectively (starting with Angular 1.3). It also brings the directives in line with HTML5 constraint validation, which validates against the input value. This change is unlikely to cause applications to fail, because even in Angular 1.2, the value that was validated by pattern could have been manipulated by the $parsers, as all validation was done inside this pipeline. If you rely on the pattern being validated against the modelValue, you must create your own validator directive that overwrites the built-in pattern validator: ``` .directive('patternModelOverwrite', function patternModelOverwriteDirective() { return { restrict: 'A', require: '?ngModel', priority: 1, compile: function() { var regexp, patternExp; return { pre: function(scope, elm, attr, ctrl) { if (!ctrl) return; attr.$observe('pattern', function(regex) { /** * 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. */ if (isString(regex) && regex.length > 0) { regex = new RegExp('^' + regex + '$'); } if (regex && !regex.test) { //The built-in validator will throw at this point return; } regexp = regex || undefined; }); }, post: function(scope, elm, attr, ctrl) { if (!ctrl) return; regexp, patternExp = attr.ngPattern || attr.pattern; //The postLink fn guarantees we overwrite the built-in pattern validator ctrl.$validators.pattern = function(value) { return ctrl.$isEmpty(value) || isUndefined(regexp) || regexp.test(value); }; } }; } }; }); ```
-
-
fix($animate): do not throw errors if element is removed before anima…
matsko committedAug 17, 2015 …tion starts Closes #10205
-
fix(ngModel): correct minErr usage for correct doc creation
Narretz committedJul 23, 2015
-
docs($rootScope.Scope): remove obsolete line, and link to guide
The removed line pointed to a removed example. Re-adding the example would have been of questionable value, as it introduced several concepts without context. It's therefore better to link to the guide, which provides a better introduction. Closes #12167
-
docs(guide/Dependency Injection): fix angular.injector arguments list
The original file included a code sample using `angular.injector(['myModule', 'ng'])`, which appears to be incorrect when trying to retrieve anything attached to `myModule`. Reversing the args fixes this. Closes #12292
-
docs(guide/Forms): display scope form / master data in examples
It will be good to have the binding results in the CSS classes / binding to form / control state example, similar to the Simple Form example. Closes #12326
-
docs(guide): Facebook was mispelled as Faceb0ok
Fixes typo :> Closes #12470
-
docs($rootScope.Scope): improve clarity describing $watch with no lis…
…tener The previous explanation in parentheses created a bit of confusion because the documentation stated to leave off the `listener`, but then said "be prepared for multiple calls to your listener". The new explanation clarifies that it is indeed the `watchExpression` that will be executed multiple times. Closes #12429
-
docs(guide/expression): replace tt by code
Replaces <tt> elements with <code> in expressions guide. Looks identical in Chromium Closes #12437 Conflicts: docs/content/guide/expression.ngdoc
-
docs($compile): pluralize DOM element
Previous description includes singular `collection of DOM element`. Current change revises `element` to be plural. Closes #12431