vendor/assets/javascripts/angular-scenario.js in angularjs-rails-1.3.9 vs vendor/assets/javascripts/angular-scenario.js in angularjs-rails-1.3.10
- old
+ new
@@ -9188,11 +9188,11 @@
return jQuery;
}));
/**
- * @license AngularJS v1.3.9
+ * @license AngularJS v1.3.10
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document){
var _jQuery = window.jQuery.noConflict(true);
@@ -9244,11 +9244,11 @@
return toDebugString(templateArgs[index + 2]);
}
return match;
});
- message = message + '\nhttp://errors.angularjs.org/1.3.9/' +
+ message = message + '\nhttp://errors.angularjs.org/1.3.10/' +
(module ? module + '/' : '') + code;
for (i = 2; i < arguments.length; i++) {
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
encodeURIComponent(toDebugString(arguments[i]));
}
@@ -10592,11 +10592,11 @@
* ```
*
* @param {DOMElement} element DOM element which is the root of angular application.
* @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
* Each item in the array should be the name of a predefined module or a (DI annotated)
- * function that will be invoked by the injector as a run block.
+ * function that will be invoked by the injector as a `config` block.
* See: {@link angular.module modules}
* @param {Object=} config an object for defining configuration options for the application. The
* following keys are supported:
*
* * `strictDi` - disable automatic function annotation for the application. This is meant to
@@ -11308,15 +11308,15 @@
* - `minor` – `{number}` – Minor version number, such as "9".
* - `dot` – `{number}` – Dot version number, such as "18".
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.3.9', // all of these placeholder strings will be replaced by grunt's
+ full: '1.3.10', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 3,
- dot: 9,
- codeName: 'multidimensional-awareness'
+ dot: 10,
+ codeName: 'heliotropic-sundial'
};
function publishExternalAPI(angular) {
extend(angular, {
@@ -13376,11 +13376,11 @@
function instantiate(Type, locals, serviceName) {
// Check if Type is annotated and use just the given function at n-1 as parameter
// e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
// Object creation: http://jsperf.com/create-constructor/2
- var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype);
+ var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);
var returnedValue = invoke(Type, instance, locals, serviceName);
return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
}
@@ -16355,10 +16355,14 @@
attrEndName);
}
// use class as directive
className = node.className;
+ if (isObject(className)) {
+ // Maybe SVGAnimatedString
+ className = className.animVal;
+ }
if (isString(className) && className !== '') {
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
nName = directiveNormalize(match[2]);
if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {
attrs[nName] = trim(match[3]);
@@ -17621,11 +17625,11 @@
// This feature is not intended for use by applications, and is thus not documented
// publicly.
// Object creation: http://jsperf.com/create-constructor/2
var controllerPrototype = (isArray(expression) ?
expression[expression.length - 1] : expression).prototype;
- instance = Object.create(controllerPrototype);
+ instance = Object.create(controllerPrototype || null);
if (identifier) {
addIdentifier(locals, identifier, instance, constructor || expression.name);
}
@@ -23690,11 +23694,11 @@
* @ngdoc method
* @name $rootScope.Scope#$applyAsync
* @kind function
*
* @description
- * Schedule the invokation of $apply to occur at a later time. The actual time difference
+ * Schedule the invocation of $apply to occur at a later time. The actual time difference
* varies across browsers, but is typically around ~10 milliseconds.
*
* This can be used to queue up multiple expressions which need to be evaluated in the same
* digest.
*
@@ -25200,12 +25204,11 @@
* @property {number} totalPendingRequests total amount of pending template requests being downloaded.
*/
function $TemplateRequestProvider() {
this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {
function handleRequestFn(tpl, ignoreRequestError) {
- var self = handleRequestFn;
- self.totalPendingRequests++;
+ handleRequestFn.totalPendingRequests++;
var transformResponse = $http.defaults && $http.defaults.transformResponse;
if (isArray(transformResponse)) {
transformResponse = transformResponse.filter(function(transformer) {
@@ -25219,17 +25222,18 @@
cache: $templateCache,
transformResponse: transformResponse
};
return $http.get(tpl, httpOptions)
+ .finally(function() {
+ handleRequestFn.totalPendingRequests--;
+ })
.then(function(response) {
- self.totalPendingRequests--;
return response.data;
}, handleError);
function handleError(resp) {
- self.totalPendingRequests--;
if (!ignoreRequestError) {
throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);
}
return $q.reject(resp);
}
@@ -26315,11 +26319,11 @@
* * `'h'`: Hour in AM/PM, (1-12)
* * `'mm'`: Minute in hour, padded (00-59)
* * `'m'`: Minute in hour (0-59)
* * `'ss'`: Second in minute, padded (00-59)
* * `'s'`: Second in minute (0-59)
- * * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)
+ * * `'sss'`: Millisecond in second, padded (000-999)
* * `'a'`: AM/PM marker
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
* * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
* * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
*
@@ -27451,10 +27455,13 @@
form.$setValidity(name, null, control);
});
forEach(form.$error, function(value, name) {
form.$setValidity(name, null, control);
});
+ forEach(form.$$success, function(value, name) {
+ form.$setValidity(name, null, control);
+ });
arrayRemove(controls, control);
};
@@ -27468,27 +27475,27 @@
* This method will also propagate to parent forms.
*/
addSetValidityMethod({
ctrl: this,
$element: element,
- set: function(object, property, control) {
+ set: function(object, property, controller) {
var list = object[property];
if (!list) {
- object[property] = [control];
+ object[property] = [controller];
} else {
- var index = list.indexOf(control);
+ var index = list.indexOf(controller);
if (index === -1) {
- list.push(control);
+ list.push(controller);
}
}
},
- unset: function(object, property, control) {
+ unset: function(object, property, controller) {
var list = object[property];
if (!list) {
return;
}
- arrayRemove(list, control);
+ arrayRemove(list, controller);
if (list.length === 0) {
delete object[property];
}
},
parentForm: parentForm,
@@ -29829,13 +29836,14 @@
*
* When the expression changes, the previously added classes are removed and only then the
* new classes are added.
*
* @animations
- * add - happens just before the class is applied to the element
- * remove - happens just before the class is removed from the element
+ * **add** - happens just before the class is applied to the elements
*
+ * **remove** - happens just before the class is removed from the element
+ *
* @element ANY
* @param {expression} ngClass {@link guide/expression Expression} to eval. The result
* of the evaluation can be a string representing space delimited class
* names, an array, or a map of class names to boolean values. In the case of a map, the
* names of the properties whose values are truthy will be added as css classes to the
@@ -31296,11 +31304,11 @@
/**
* @ngdoc event
* @name ngInclude#$includeContentError
* @eventType emit on the scope ngInclude was declared in
* @description
- * Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299)
+ * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)
*
* @param {Object} angularEvent Synthetic event object.
* @param {String} src URL of content to load.
*/
var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',
@@ -32853,26 +32861,26 @@
classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));
ctrl.$setValidity = setValidity;
- function setValidity(validationErrorKey, state, options) {
+ function setValidity(validationErrorKey, state, controller) {
if (state === undefined) {
- createAndSet('$pending', validationErrorKey, options);
+ createAndSet('$pending', validationErrorKey, controller);
} else {
- unsetAndCleanup('$pending', validationErrorKey, options);
+ unsetAndCleanup('$pending', validationErrorKey, controller);
}
if (!isBoolean(state)) {
- unset(ctrl.$error, validationErrorKey, options);
- unset(ctrl.$$success, validationErrorKey, options);
+ unset(ctrl.$error, validationErrorKey, controller);
+ unset(ctrl.$$success, validationErrorKey, controller);
} else {
if (state) {
- unset(ctrl.$error, validationErrorKey, options);
- set(ctrl.$$success, validationErrorKey, options);
+ unset(ctrl.$error, validationErrorKey, controller);
+ set(ctrl.$$success, validationErrorKey, controller);
} else {
- set(ctrl.$error, validationErrorKey, options);
- unset(ctrl.$$success, validationErrorKey, options);
+ set(ctrl.$error, validationErrorKey, controller);
+ unset(ctrl.$$success, validationErrorKey, controller);
}
}
if (ctrl.$pending) {
cachedToggleClass(PENDING_CLASS, true);
ctrl.$valid = ctrl.$invalid = undefined;
@@ -32896,24 +32904,25 @@
} else if (ctrl.$$success[validationErrorKey]) {
combinedState = true;
} else {
combinedState = null;
}
+
toggleValidationCss(validationErrorKey, combinedState);
parentForm.$setValidity(validationErrorKey, combinedState, ctrl);
}
- function createAndSet(name, value, options) {
+ function createAndSet(name, value, controller) {
if (!ctrl[name]) {
ctrl[name] = {};
}
- set(ctrl[name], value, options);
+ set(ctrl[name], value, controller);
}
- function unsetAndCleanup(name, value, options) {
+ function unsetAndCleanup(name, value, controller) {
if (ctrl[name]) {
- unset(ctrl[name], value, options);
+ unset(ctrl[name], value, controller);
}
if (isObjectEmpty(ctrl[name])) {
ctrl[name] = undefined;
}
}
@@ -33228,10 +33237,33 @@
* | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |
*
* Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.
* This may be useful when, for instance, nesting ngRepeats.
*
+ * # Iterating over object properties
+ *
+ * It is possible to get `ngRepeat` to iterate over the properties of an object using the following
+ * syntax:
+ *
+ * ```js
+ * <div ng-repeat="(key, value) in myObj"> ... </div>
+ * ```
+ *
+ * You need to be aware that the JavaScript specification does not define what order
+ * it will return the keys for an object. In order to have a guaranteed deterministic order
+ * for the keys, Angular versions up to and including 1.3 **sort the keys alphabetically**.
+ *
+ * If this is not desired, the recommended workaround is to convert your object into an array
+ * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
+ * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)
+ * or implement a `$watch` on the object yourself.
+ *
+ * In version 1.4 we will remove the sorting, since it seems that browsers generally follow the
+ * strategy of providing keys in the order in which they were defined, although there are exceptions
+ * when keys are deleted and reinstated.
+ *
+ *
* # Special repeat start and end points
* To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
* the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
* The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)
* up to and including the ending HTML tag where **ng-repeat-end** is placed.
@@ -33472,10 +33504,10 @@
}
var valueIdentifier = match[3] || match[1];
var keyIdentifier = match[2];
if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||
- /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(aliasAs))) {
+ /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))) {
throw ngRepeatMinErr('badident', "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",
aliasAs);
}
var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;
\ No newline at end of file