diff --git a/app/bower_components/angular-mocks/.bower.json b/app/bower_components/angular-mocks/.bower.json
index ce38275..d7ca1a0 100644
--- a/app/bower_components/angular-mocks/.bower.json
+++ b/app/bower_components/angular-mocks/.bower.json
@@ -1,18 +1,18 @@
{
"name": "angular-mocks",
- "version": "1.2.16",
+ "version": "1.2.21",
"main": "./angular-mocks.js",
"dependencies": {
- "angular": "1.2.16"
+ "angular": "1.2.21"
},
"homepage": "https://github.com/angular/bower-angular-mocks",
- "_release": "1.2.16",
+ "_release": "1.2.21",
"_resolution": {
"type": "version",
- "tag": "v1.2.16",
- "commit": "e429a011d88c402430329449500f352751d1a137"
+ "tag": "v1.2.21",
+ "commit": "ab33e90eaec5bb2c96126e808ae9f44cf59b7205"
},
"_source": "git://github.com/angular/bower-angular-mocks.git",
- "_target": "1.2.16",
+ "_target": "1.2.21",
"_originalSource": "angular-mocks"
}
\ No newline at end of file
diff --git a/app/bower_components/angular-mocks/angular-mocks.js b/app/bower_components/angular-mocks/angular-mocks.js
index da804b4..c2f9cec 100644
--- a/app/bower_components/angular-mocks/angular-mocks.js
+++ b/app/bower_components/angular-mocks/angular-mocks.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.2.16
+ * @license AngularJS v1.2.21
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -462,7 +462,7 @@ angular.mock.$IntervalProvider = function() {
iteration = 0,
skipApply = (angular.isDefined(invokeApply) && !invokeApply);
- count = (angular.isDefined(count)) ? count : 0,
+ count = (angular.isDefined(count)) ? count : 0;
promise.then(null, null, fn);
promise.$$intervalId = nextRepeatId;
@@ -900,7 +900,7 @@ angular.mock.dump = function(object) {
* When an Angular application needs some data from a server, it calls the $http service, which
* sends the request to a real server using $httpBackend service. With dependency injection, it is
* easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
- * the requests and respond with some testing data without sending a request to real server.
+ * the requests and respond with some testing data without sending a request to a real server.
*
* There are two ways to specify what test data should be returned as http responses by the mock
* backend when the code under test makes http requests:
@@ -1722,11 +1722,12 @@ angular.mock.$RootElementProvider = function() {
/**
* @ngdoc module
* @name ngMock
+ * @packageName angular-mocks
* @description
*
* # ngMock
*
- * The `ngMock` module providers support to inject and mock Angular services into unit tests.
+ * The `ngMock` module provides support to inject and mock Angular services into unit tests.
* In addition, ngMock also extends various core ng services such that they can be
* inspected and controlled in a synchronous manner within test code.
*
@@ -1751,6 +1752,7 @@ angular.module('ngMock', ['ng']).provider({
* @ngdoc module
* @name ngMockE2E
* @module ngMockE2E
+ * @packageName angular-mocks
* @description
*
* The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
@@ -1800,7 +1802,9 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
*
* // adds a new phone to the phones array
* $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
- * phones.push(angular.fromJson(data));
+ * var phone = angular.fromJson(data);
+ * phones.push(phone);
+ * return [200, phone, {}];
* });
* $httpBackend.whenGET(/^\/templates\//).passThrough();
* //...
@@ -1956,13 +1960,19 @@ if(window.jasmine || window.mocha) {
};
- beforeEach(function() {
+ (window.beforeEach || window.setup)(function() {
currentSpec = this;
});
- afterEach(function() {
+ (window.afterEach || window.teardown)(function() {
var injector = currentSpec.$injector;
+ angular.forEach(currentSpec.$modules, function(module) {
+ if (module && module.$$hashKey) {
+ module.$$hashKey = undefined;
+ }
+ });
+
currentSpec.$injector = null;
currentSpec.$modules = null;
currentSpec = null;
@@ -2002,7 +2012,7 @@ if(window.jasmine || window.mocha) {
* @param {...(string|Function|Object)} fns any number of modules which are represented as string
* aliases or as anonymous module initialization functions. The modules are used to
* configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
- * object literal is passed they will be register as values in the module, the key being
+ * object literal is passed they will be registered as values in the module, the key being
* the module name and the value being what is returned.
*/
window.module = angular.mock.module = function() {
diff --git a/app/bower_components/angular-mocks/bower.json b/app/bower_components/angular-mocks/bower.json
index 09d2e7c..5ad409f 100644
--- a/app/bower_components/angular-mocks/bower.json
+++ b/app/bower_components/angular-mocks/bower.json
@@ -1,8 +1,8 @@
{
"name": "angular-mocks",
- "version": "1.2.16",
+ "version": "1.2.21",
"main": "./angular-mocks.js",
"dependencies": {
- "angular": "1.2.16"
+ "angular": "1.2.21"
}
}
diff --git a/app/bower_components/angular-route/.bower.json b/app/bower_components/angular-route/.bower.json
index 4bacfc5..10cb905 100644
--- a/app/bower_components/angular-route/.bower.json
+++ b/app/bower_components/angular-route/.bower.json
@@ -1,18 +1,18 @@
{
"name": "angular-route",
- "version": "1.2.16",
+ "version": "1.2.21",
"main": "./angular-route.js",
"dependencies": {
- "angular": "1.2.16"
+ "angular": "1.2.21"
},
"homepage": "https://github.com/angular/bower-angular-route",
- "_release": "1.2.16",
+ "_release": "1.2.21",
"_resolution": {
"type": "version",
- "tag": "v1.2.16",
- "commit": "ed0e2b796077d953f518cb81cc7af981cf695a45"
+ "tag": "v1.2.21",
+ "commit": "a3f4ff7700330ef8e1e84b31177fa1b2206884c8"
},
"_source": "git://github.com/angular/bower-angular-route.git",
- "_target": "1.2.16",
+ "_target": "~1.2.21",
"_originalSource": "angular-route"
}
\ No newline at end of file
diff --git a/app/bower_components/angular-route/angular-route.js b/app/bower_components/angular-route/angular-route.js
index f7ebda8..a589753 100644
--- a/app/bower_components/angular-route/angular-route.js
+++ b/app/bower_components/angular-route/angular-route.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.2.16
+ * @license AngularJS v1.2.21
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -27,7 +27,7 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
/**
* @ngdoc provider
* @name $routeProvider
- * @function
+ * @kind function
*
* @description
*
@@ -473,9 +473,7 @@ function $RouteProvider(){
for (var i = 1, len = m.length; i < len; ++i) {
var key = keys[i - 1];
- var val = 'string' == typeof m[i]
- ? decodeURIComponent(m[i])
- : m[i];
+ var val = m[i];
if (key && val) {
params[key.name] = val;
@@ -632,7 +630,7 @@ ngRouteModule.provider('$routeParams', $RouteParamsProvider);
* // Route: /Chapter/:chapterId/Section/:sectionId
* //
* // Then
- * $routeParams ==> {chapterId:1, sectionId:2, search:'moby'}
+ * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}
* ```
*/
function $RouteParamsProvider() {
diff --git a/app/bower_components/angular-route/angular-route.min.js b/app/bower_components/angular-route/angular-route.min.js
index aef1fd6..54e7dc9 100644
--- a/app/bower_components/angular-route/angular-route.min.js
+++ b/app/bower_components/angular-route/angular-route.min.js
@@ -1,14 +1,14 @@
/*
- AngularJS v1.2.16
+ AngularJS v1.2.21
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
-(function(n,e,A){'use strict';function x(s,g,k){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,w){function y(){p&&(p.remove(),p=null);h&&(h.$destroy(),h=null);l&&(k.leave(l,function(){p=null}),p=l,l=null)}function v(){var b=s.current&&s.current.locals;if(e.isDefined(b&&b.$template)){var b=a.$new(),d=s.current;l=w(b,function(d){k.enter(d,null,l||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||g()});y()});h=d.scope=b;h.$emit("$viewContentLoaded");h.$eval(u)}else y()}
-var h,l,p,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",v);v()}}}function z(e,g,k){return{restrict:"ECA",priority:-400,link:function(a,c){var b=k.current,f=b.locals;c.html(f.$template);var w=e(c.contents());b.controller&&(f.$scope=a,f=g(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));w(a)}}}n=e.module("ngRoute",["ng"]).provider("$route",function(){function s(a,c){return e.extend(new (e.extend(function(){},
-{prototype:a})),c)}function g(a,e){var b=e.caseInsensitiveMatch,f={originalPath:a,regexp:a},k=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;k.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var k={};this.when=function(a,c){k[a]=e.extend({reloadOnSearch:!0},c,a&&g(a,c));if(a){var b=
-"/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";k[b]=e.extend({redirectTo:a},g(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,g,n,v,h){function l(){var d=p(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!u)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)u=!1,a.$broadcast("$routeChangeStart",
-d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(t(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?g.get(d):g.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=h.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl=
-b,c=n.get(b,{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function p(){var a,b;e.forEach(k,function(f,k){var q;if(q=!b){var g=c.path();q=f.keys;var l={};if(f.regexp)if(g=f.regexp.exec(g)){for(var h=1,p=g.length;h
+
-
+
Snippet:
@@ -158,14 +159,15 @@ function sanitizeText(chars) {
// Regular Expressions for parsing tags and attributes
var START_TAG_REGEXP =
- /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
- END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/,
+ /^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,
+ END_TAG_REGEXP = /^<\/\s*([\w:-]+)[^>]*>/,
ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
BEGIN_TAG_REGEXP = /^,
- BEGING_END_TAGE_REGEXP = /^<\s*\//,
+ BEGING_END_TAGE_REGEXP = /^<\//,
COMMENT_REGEXP = //g,
DOCTYPE_REGEXP = /]*?)>/i,
CDATA_REGEXP = //g,
+ SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
// Match everything outside of normal chars and " (quote character)
NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g;
@@ -235,10 +237,11 @@ function makeMap(str) {
* @param {object} handler
*/
function htmlParser( html, handler ) {
- var index, chars, match, stack = [], last = html;
+ var index, chars, match, stack = [], last = html, text;
stack.last = function() { return stack[ stack.length - 1 ]; };
while ( html ) {
+ text = '';
chars = true;
// Make sure we're not in a script or style element
@@ -277,16 +280,23 @@ function htmlParser( html, handler ) {
match = html.match( START_TAG_REGEXP );
if ( match ) {
- html = html.substring( match[0].length );
- match[0].replace( START_TAG_REGEXP, parseStartTag );
+ // We only have a valid start-tag if there is a '>'.
+ if ( match[4] ) {
+ html = html.substring( match[0].length );
+ match[0].replace( START_TAG_REGEXP, parseStartTag );
+ }
chars = false;
+ } else {
+ // no ending tag found --- this piece should be encoded as an entity.
+ text += '<';
+ html = html.substring(1);
}
}
if ( chars ) {
index = html.indexOf("<");
- var text = index < 0 ? html : html.substring( 0, index );
+ text += index < 0 ? html : html.substring( 0, index );
html = index < 0 ? "" : html.substring( index );
if (handler.chars) handler.chars( decodeEntities(text) );
@@ -404,6 +414,11 @@ function decodeEntities(value) {
function encodeEntities(value) {
return value.
replace(/&/g, '&').
+ replace(SURROGATE_PAIR_REGEXP, function (value) {
+ var hi = value.charCodeAt(0);
+ var low = value.charCodeAt(1);
+ return '' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
+ }).
replace(NON_ALPHANUMERIC_REGEXP, function(value){
return '' + value.charCodeAt(0) + ';';
}).
@@ -476,7 +491,7 @@ angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
/**
* @ngdoc filter
* @name linky
- * @function
+ * @kind function
*
* @description
* Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
@@ -492,20 +507,21 @@ angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
*
* @example
-
+
-
+
Snippet:
diff --git a/app/bower_components/angular-sanitize/angular-sanitize.min.js b/app/bower_components/angular-sanitize/angular-sanitize.min.js
index 0896471..b7f8105 100644
--- a/app/bower_components/angular-sanitize/angular-sanitize.min.js
+++ b/app/bower_components/angular-sanitize/angular-sanitize.min.js
@@ -1,14 +1,15 @@
/*
- AngularJS v1.2.16
+ AngularJS v1.2.21
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
-(function(p,h,q){'use strict';function E(a){var e=[];s(e,h.noop).chars(a);return e.join("")}function k(a){var e={};a=a.split(",");var d;for(d=0;d=c;d--)e.end&&e.end(f[d]);f.length=c}}var b,g,f=[],l=a;for(f.last=function(){return f[f.length-1]};a;){g=!0;if(f.last()&&x[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(b,a){a=a.replace(H,"$1").replace(I,"$1");e.chars&&e.chars(r(a));return""}),c("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(e.comment&&e.comment(a.substring(4,b)),a=a.substring(b+3),g=!1);else if(y.test(a)){if(b=a.match(y))a=
-a.replace(b[0],""),g=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,c),g=!1}else K.test(a)&&(b=a.match(A))&&(a=a.substring(b[0].length),b[0].replace(A,d),g=!1);g&&(b=a.indexOf("<"),g=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),e.chars&&e.chars(r(g)))}if(a==l)throw L("badparse",a);l=a}c()}function r(a){if(!a)return"";var e=M.exec(a);a=e[1];var d=e[3];if(e=e[2])n.innerHTML=e.replace(//g,">")}function s(a,e){var d=!1,c=h.bind(a,a.push);return{start:function(a,g,f){a=h.lowercase(a);!d&&x[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(g,function(d,f){var g=h.lowercase(f),k="img"===a&&"src"===g||"background"===g;!0!==O[g]||!0===D[g]&&!e(d,k)||(c(" "),c(f),c('="'),c(B(d)),c('"'))}),c(f?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c(""),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||
-c(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,z=/^<\s*\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^,J=/^<\s*\//,H=/\x3c!--(.*?)--\x3e/g,y=/]*?)>/i,I=/]/,d=/^mailto:/;return function(c,b){function g(a){a&&m.push(E(a))}function f(a,c){m.push("');g(c);m.push("")}if(!c)return c;for(var l,k=c,m=[],n,p;l=k.match(e);)n=l[0],l[2]==l[3]&&(n="mailto:"+n),p=l.index,g(k.substr(0,p)),f(n,l[0].replace(d,"")),k=k.substring(p+l[0].length);g(k);return a(m.join(""))}}])})(window,window.angular);
+(function(q,g,r){'use strict';function F(a){var d=[];t(d,g.noop).chars(a);return d.join("")}function m(a){var d={};a=a.split(",");var b;for(b=0;b=b;e--)d.end&&d.end(f[e]);f.length=b}}var c,l,f=[],n=a,h;for(f.last=function(){return f[f.length-1]};a;){h="";l=!0;if(f.last()&&y[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(c,a){a=a.replace(I,"$1").replace(J,"$1");d.chars&&d.chars(s(a));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))c=a.indexOf("--",4),0<=c&&a.lastIndexOf("--\x3e",c)===c&&(d.comment&&d.comment(a.substring(4,c)),a=a.substring(c+3),l=!1);else if(z.test(a)){if(c=
+a.match(z))a=a.replace(c[0],""),l=!1}else if(K.test(a)){if(c=a.match(A))a=a.substring(c[0].length),c[0].replace(A,e),l=!1}else L.test(a)&&((c=a.match(B))?(c[4]&&(a=a.substring(c[0].length),c[0].replace(B,b)),l=!1):(h+="<",a=a.substring(1)));l&&(c=a.indexOf("<"),h+=0>c?a:a.substring(0,c),a=0>c?"":a.substring(c),d.chars&&d.chars(s(h)))}if(a==n)throw M("badparse",a);n=a}e()}function s(a){if(!a)return"";var d=N.exec(a);a=d[1];var b=d[3];if(d=d[2])p.innerHTML=d.replace(//g,">")}function t(a,d){var b=!1,e=g.bind(a,a.push);return{start:function(a,l,f){a=g.lowercase(a);!b&&y[a]&&(b=a);b||!0!==D[a]||(e("<"),e(a),g.forEach(l,function(b,f){var k=g.lowercase(f),l="img"===a&&"src"===k||"background"===
+k;!0!==Q[k]||!0===E[k]&&!d(b,l)||(e(" "),e(f),e('="'),e(C(b)),e('"'))}),e(f?"/>":">"))},end:function(a){a=g.lowercase(a);b||!0!==D[a]||(e(""),e(a),e(">"));a==b&&(b=!1)},chars:function(a){b||e(C(a))}}}var M=g.$$minErr("$sanitize"),B=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,A=/^<\/\s*([\w:-]+)[^>]*>/,H=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,L=/^,K=/^<\//,I=/\x3c!--(.*?)--\x3e/g,z=/]*?)>/i,
+J=/]/,b=/^mailto:/;return function(e,c){function l(a){a&&k.push(F(a))}function f(a,b){k.push("');l(b);k.push("")}
+if(!e)return e;for(var n,h=e,k=[],m,p;n=h.match(d);)m=n[0],n[2]==n[3]&&(m="mailto:"+m),p=n.index,l(h.substr(0,p)),f(m,n[0].replace(b,"")),h=h.substring(p+n[0].length);l(h);return a(k.join(""))}}])})(window,window.angular);
//# sourceMappingURL=angular-sanitize.min.js.map
diff --git a/app/bower_components/angular-sanitize/angular-sanitize.min.js.map b/app/bower_components/angular-sanitize/angular-sanitize.min.js.map
index dbf6b25..1b4a750 100644
--- a/app/bower_components/angular-sanitize/angular-sanitize.min.js.map
+++ b/app/bower_components/angular-sanitize/angular-sanitize.min.js.map
@@ -1,8 +1,8 @@
{
"version":3,
"file":"angular-sanitize.min.js",
-"lineCount":13,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAiJtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAmE7BC,QAASA,EAAO,CAACC,CAAD,CAAM,CAAA,IAChBC,EAAM,EAAIC,EAAAA,CAAQF,CAAAG,MAAA,CAAU,GAAV,CAAtB,KAAsCC,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AAU,MAAV,CAX0B,CA3BA;AAC5B,GAAI,CAACc,CAAL,CAAW,MAAOA,EAMlB,KALA,IAAIV,CAAJ,CACI6E,EAAMnE,CADV,CAEI7B,EAAO,EAFX,CAGI8F,CAHJ,CAIIjG,CACJ,CAAQsB,CAAR,CAAgB6E,CAAA7E,MAAA,CAAUsE,CAAV,CAAhB,CAAA,CAEEK,CAMA,CANM3E,CAAA,CAAM,CAAN,CAMN,CAJIA,CAAA,CAAM,CAAN,CAIJ,EAJgBA,CAAA,CAAM,CAAN,CAIhB,GAJ0B2E,CAI1B,CAJgC,SAIhC,CAJ4CA,CAI5C,EAHAjG,CAGA,CAHIsB,CAAAS,MAGJ,CAFAgE,CAAA,CAAQI,CAAAC,OAAA,CAAW,CAAX,CAAcpG,CAAd,CAAR,CAEA,CADAgG,CAAA,CAAQC,CAAR,CAAa3E,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAiByE,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAM,CAAA,CAAMA,CAAAzD,UAAA,CAAc1C,CAAd,CAAkBsB,CAAA,CAAM,CAAN,CAAArB,OAAlB,CAER8F,EAAA,CAAQI,CAAR,CACA,OAAOR,EAAA,CAAUxF,CAAAT,KAAA,CAAU,EAAV,CAAV,CAlBqB,CAL+C,CAAlC,CAA7C,CAzkBsC,CAArC,CAAA,CA0nBET,MA1nBF,CA0nBUA,MAAAC,QA1nBV;",
"sources":["angular-sanitize.js"],
-"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","stack.last","specialElements","RegExp","all","text","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","NON_ALPHANUMERIC_REGEXP","charCodeAt","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"]
+"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","text","stack.last","specialElements","RegExp","all","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"]
}
diff --git a/app/bower_components/angular-sanitize/bower.json b/app/bower_components/angular-sanitize/bower.json
index 1160f22..7daf7d9 100644
--- a/app/bower_components/angular-sanitize/bower.json
+++ b/app/bower_components/angular-sanitize/bower.json
@@ -1,8 +1,8 @@
{
"name": "angular-sanitize",
- "version": "1.2.16",
+ "version": "1.2.21",
"main": "./angular-sanitize.js",
"dependencies": {
- "angular": "1.2.16"
+ "angular": "1.2.21"
}
}
diff --git a/app/bower_components/angular-scenario/.bower.json b/app/bower_components/angular-scenario/.bower.json
index f33be68..89f1aa4 100644
--- a/app/bower_components/angular-scenario/.bower.json
+++ b/app/bower_components/angular-scenario/.bower.json
@@ -1,18 +1,18 @@
{
"name": "angular-scenario",
- "version": "1.2.16",
+ "version": "1.2.21",
"main": "./angular-scenario.js",
"dependencies": {
- "angular": "1.2.16"
+ "angular": "1.2.21"
},
"homepage": "https://github.com/angular/bower-angular-scenario",
- "_release": "1.2.16",
+ "_release": "1.2.21",
"_resolution": {
"type": "version",
- "tag": "v1.2.16",
- "commit": "387bd67cc4863655aed0f889956cdeb4acdb03ae"
+ "tag": "v1.2.21",
+ "commit": "1e442f99fe1531084a8c502b0acb097f7f65988b"
},
"_source": "git://github.com/angular/bower-angular-scenario.git",
- "_target": "1.2.16",
+ "_target": "1.2.21",
"_originalSource": "angular-scenario"
}
\ No newline at end of file
diff --git a/app/bower_components/angular-scenario/angular-scenario.js b/app/bower_components/angular-scenario/angular-scenario.js
index 81491c5..5a6ac19 100644
--- a/app/bower_components/angular-scenario/angular-scenario.js
+++ b/app/bower_components/angular-scenario/angular-scenario.js
@@ -9790,7 +9790,7 @@ if ( typeof module === "object" && module && typeof module.exports === "object"
})( window );
/**
- * @license AngularJS v1.2.16
+ * @license AngularJS v1.2.21
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -9860,7 +9860,7 @@ function minErr(module) {
return match;
});
- message = message + '\nhttp://errors.angularjs.org/1.2.16/' +
+ message = message + '\nhttp://errors.angularjs.org/1.2.21/' +
(module ? module + '/' : '') + code;
for (i = 2; i < arguments.length; i++) {
message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -9872,89 +9872,88 @@ function minErr(module) {
}
/* We need to tell jshint what variables are being exported */
-/* global
- -angular,
- -msie,
- -jqLite,
- -jQuery,
- -slice,
- -push,
- -toString,
- -ngMinErr,
- -_angular,
- -angularModule,
- -nodeName_,
- -uid,
-
- -lowercase,
- -uppercase,
- -manualLowercase,
- -manualUppercase,
- -nodeName_,
- -isArrayLike,
- -forEach,
- -sortedKeys,
- -forEachSorted,
- -reverseParams,
- -nextUid,
- -setHashKey,
- -extend,
- -int,
- -inherit,
- -noop,
- -identity,
- -valueFn,
- -isUndefined,
- -isDefined,
- -isObject,
- -isString,
- -isNumber,
- -isDate,
- -isArray,
- -isFunction,
- -isRegExp,
- -isWindow,
- -isScope,
- -isFile,
- -isBlob,
- -isBoolean,
- -trim,
- -isElement,
- -makeMap,
- -map,
- -size,
- -includes,
- -indexOf,
- -arrayRemove,
- -isLeafNode,
- -copy,
- -shallowCopy,
- -equals,
- -csp,
- -concat,
- -sliceArgs,
- -bind,
- -toJsonReplacer,
- -toJson,
- -fromJson,
- -toBoolean,
- -startingTag,
- -tryDecodeURIComponent,
- -parseKeyValue,
- -toKeyValue,
- -encodeUriSegment,
- -encodeUriQuery,
- -angularInit,
- -bootstrap,
- -snake_case,
- -bindJQuery,
- -assertArg,
- -assertArgFn,
- -assertNotHasOwnProperty,
- -getter,
- -getBlockElements,
- -hasOwnProperty,
+/* global angular: true,
+ msie: true,
+ jqLite: true,
+ jQuery: true,
+ slice: true,
+ push: true,
+ toString: true,
+ ngMinErr: true,
+ angularModule: true,
+ nodeName_: true,
+ uid: true,
+ VALIDITY_STATE_PROPERTY: true,
+ lowercase: true,
+ uppercase: true,
+ manualLowercase: true,
+ manualUppercase: true,
+ nodeName_: true,
+ isArrayLike: true,
+ forEach: true,
+ sortedKeys: true,
+ forEachSorted: true,
+ reverseParams: true,
+ nextUid: true,
+ setHashKey: true,
+ extend: true,
+ int: true,
+ inherit: true,
+ noop: true,
+ identity: true,
+ valueFn: true,
+ isUndefined: true,
+ isDefined: true,
+ isObject: true,
+ isString: true,
+ isNumber: true,
+ isDate: true,
+ isArray: true,
+ isFunction: true,
+ isRegExp: true,
+ isWindow: true,
+ isScope: true,
+ isFile: true,
+ isBlob: true,
+ isBoolean: true,
+ isPromiseLike: true,
+ trim: true,
+ isElement: true,
+ makeMap: true,
+ map: true,
+ size: true,
+ includes: true,
+ indexOf: true,
+ arrayRemove: true,
+ isLeafNode: true,
+ copy: true,
+ shallowCopy: true,
+ equals: true,
+ csp: true,
+ concat: true,
+ sliceArgs: true,
+ bind: true,
+ toJsonReplacer: true,
+ toJson: true,
+ fromJson: true,
+ toBoolean: true,
+ startingTag: true,
+ tryDecodeURIComponent: true,
+ parseKeyValue: true,
+ toKeyValue: true,
+ encodeUriSegment: true,
+ encodeUriQuery: true,
+ angularInit: true,
+ bootstrap: true,
+ snake_case: true,
+ bindJQuery: true,
+ assertArg: true,
+ assertArgFn: true,
+ assertNotHasOwnProperty: true,
+ getter: true,
+ getBlockElements: true,
+ hasOwnProperty: true,
*/
////////////////////////////////////
@@ -9974,11 +9973,15 @@ function minErr(module) {
*
*/
+// The name of a form control's ValidityState property.
+// This is used so that it's possible for internal tests to create mock ValidityStates.
+var VALIDITY_STATE_PROPERTY = 'validity';
+
/**
* @ngdoc function
* @name angular.lowercase
* @module ng
- * @function
+ * @kind function
*
* @description Converts the specified string to lowercase.
* @param {string} string String to be converted to lowercase.
@@ -9991,7 +9994,7 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;
* @ngdoc function
* @name angular.uppercase
* @module ng
- * @function
+ * @kind function
*
* @description Converts the specified string to uppercase.
* @param {string} string String to be converted to uppercase.
@@ -10032,8 +10035,6 @@ var /** holds major version number for IE or NaN for real browsers */
toString = Object.prototype.toString,
ngMinErr = minErr('ng'),
-
- _angular = window.angular,
/** @name angular */
angular = window.angular || (window.angular = {}),
angularModule,
@@ -10075,7 +10076,7 @@ function isArrayLike(obj) {
* @ngdoc function
* @name angular.forEach
* @module ng
- * @function
+ * @kind function
*
* @description
* Invokes the `iterator` function once for each item in `obj` collection, which can be either an
@@ -10089,7 +10090,7 @@ function isArrayLike(obj) {
```js
var values = {name: 'misko', gender: 'male'};
var log = [];
- angular.forEach(values, function(value, key){
+ angular.forEach(values, function(value, key) {
this.push(key + ': ' + value);
}, log);
expect(log).toEqual(['name: misko', 'gender: male']);
@@ -10103,7 +10104,7 @@ function isArrayLike(obj) {
function forEach(obj, iterator, context) {
var key;
if (obj) {
- if (isFunction(obj)){
+ if (isFunction(obj)) {
for (key in obj) {
// Need to check if hasOwnProperty exists,
// as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
@@ -10111,11 +10112,12 @@ function forEach(obj, iterator, context) {
iterator.call(context, obj[key], key);
}
}
- } else if (obj.forEach && obj.forEach !== forEach) {
- obj.forEach(iterator, context);
- } else if (isArrayLike(obj)) {
- for (key = 0; key < obj.length; key++)
+ } else if (isArray(obj) || isArrayLike(obj)) {
+ for (key = 0; key < obj.length; key++) {
iterator.call(context, obj[key], key);
+ }
+ } else if (obj.forEach && obj.forEach !== forEach) {
+ obj.forEach(iterator, context);
} else {
for (key in obj) {
if (obj.hasOwnProperty(key)) {
@@ -10204,7 +10206,7 @@ function setHashKey(obj, h) {
* @ngdoc function
* @name angular.extend
* @module ng
- * @function
+ * @kind function
*
* @description
* Extends the destination object `dst` by copying all of the properties from the `src` object(s)
@@ -10216,9 +10218,9 @@ function setHashKey(obj, h) {
*/
function extend(dst) {
var h = dst.$$hashKey;
- forEach(arguments, function(obj){
+ forEach(arguments, function(obj) {
if (obj !== dst) {
- forEach(obj, function(value, key){
+ forEach(obj, function(value, key) {
dst[key] = value;
});
}
@@ -10241,7 +10243,7 @@ function inherit(parent, extra) {
* @ngdoc function
* @name angular.noop
* @module ng
- * @function
+ * @kind function
*
* @description
* A function that performs no operations. This function can be useful when writing code in the
@@ -10261,7 +10263,7 @@ noop.$inject = [];
* @ngdoc function
* @name angular.identity
* @module ng
- * @function
+ * @kind function
*
* @description
* A function that returns its first argument. This function is useful when writing code in the
@@ -10283,7 +10285,7 @@ function valueFn(value) {return function() {return value;};}
* @ngdoc function
* @name angular.isUndefined
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is undefined.
@@ -10298,7 +10300,7 @@ function isUndefined(value){return typeof value === 'undefined';}
* @ngdoc function
* @name angular.isDefined
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is defined.
@@ -10313,7 +10315,7 @@ function isDefined(value){return typeof value !== 'undefined';}
* @ngdoc function
* @name angular.isObject
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
@@ -10329,7 +10331,7 @@ function isObject(value){return value != null && typeof value === 'object';}
* @ngdoc function
* @name angular.isString
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is a `String`.
@@ -10344,7 +10346,7 @@ function isString(value){return typeof value === 'string';}
* @ngdoc function
* @name angular.isNumber
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is a `Number`.
@@ -10359,7 +10361,7 @@ function isNumber(value){return typeof value === 'number';}
* @ngdoc function
* @name angular.isDate
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a value is a date.
@@ -10367,7 +10369,7 @@ function isNumber(value){return typeof value === 'number';}
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `Date`.
*/
-function isDate(value){
+function isDate(value) {
return toString.call(value) === '[object Date]';
}
@@ -10376,7 +10378,7 @@ function isDate(value){
* @ngdoc function
* @name angular.isArray
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is an `Array`.
@@ -10384,16 +10386,20 @@ function isDate(value){
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is an `Array`.
*/
-function isArray(value) {
- return toString.call(value) === '[object Array]';
-}
-
+var isArray = (function() {
+ if (!isFunction(Array.isArray)) {
+ return function(value) {
+ return toString.call(value) === '[object Array]';
+ };
+ }
+ return Array.isArray;
+})();
/**
* @ngdoc function
* @name angular.isFunction
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is a `Function`.
@@ -10448,6 +10454,11 @@ function isBoolean(value) {
}
+function isPromiseLike(obj) {
+ return obj && isFunction(obj.then);
+}
+
+
var trim = (function() {
// native trim is way faster: http://jsperf.com/angular-trim-test
// but IE doesn't have it... :-(
@@ -10467,7 +10478,7 @@ var trim = (function() {
* @ngdoc function
* @name angular.isElement
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if a reference is a DOM element (or wrapped jQuery element).
@@ -10485,7 +10496,7 @@ function isElement(node) {
* @param str 'key1,key2,...'
* @returns {object} in the form of {key1:true, key2:true, ...}
*/
-function makeMap(str){
+function makeMap(str) {
var obj = {}, items = str.split(","), i;
for ( i = 0; i < items.length; i++ )
obj[ items[i] ] = true;
@@ -10532,7 +10543,7 @@ function size(obj, ownPropsOnly) {
if (isArray(obj) || isString(obj)) {
return obj.length;
- } else if (isObject(obj)){
+ } else if (isObject(obj)) {
for (key in obj)
if (!ownPropsOnly || obj.hasOwnProperty(key))
count++;
@@ -10578,7 +10589,7 @@ function isLeafNode (node) {
* @ngdoc function
* @name angular.copy
* @module ng
- * @function
+ * @kind function
*
* @description
* Creates a deep copy of `source`, which should be an object or an array.
@@ -10596,9 +10607,9 @@ function isLeafNode (node) {
* @returns {*} The copy or updated `destination`, if `destination` was specified.
*
* @example
-
+
-
+
*/
-function copy(source, destination){
+function copy(source, destination, stackSource, stackDest) {
if (isWindow(source) || isScope(source)) {
throw ngMinErr('cpws',
"Can't copy! Making copies of Window or Scope instances is not supported.");
@@ -10641,52 +10653,83 @@ function copy(source, destination){
destination = source;
if (source) {
if (isArray(source)) {
- destination = copy(source, []);
+ destination = copy(source, [], stackSource, stackDest);
} else if (isDate(source)) {
destination = new Date(source.getTime());
} else if (isRegExp(source)) {
- destination = new RegExp(source.source);
+ destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
+ destination.lastIndex = source.lastIndex;
} else if (isObject(source)) {
- destination = copy(source, {});
+ destination = copy(source, {}, stackSource, stackDest);
}
}
} else {
if (source === destination) throw ngMinErr('cpi',
"Can't copy! Source and destination are identical.");
+
+ stackSource = stackSource || [];
+ stackDest = stackDest || [];
+
+ if (isObject(source)) {
+ var index = indexOf(stackSource, source);
+ if (index !== -1) return stackDest[index];
+
+ stackSource.push(source);
+ stackDest.push(destination);
+ }
+
+ var result;
if (isArray(source)) {
destination.length = 0;
for ( var i = 0; i < source.length; i++) {
- destination.push(copy(source[i]));
+ result = copy(source[i], null, stackSource, stackDest);
+ if (isObject(source[i])) {
+ stackSource.push(source[i]);
+ stackDest.push(result);
+ }
+ destination.push(result);
}
} else {
var h = destination.$$hashKey;
- forEach(destination, function(value, key){
+ forEach(destination, function(value, key) {
delete destination[key];
});
for ( var key in source) {
- destination[key] = copy(source[key]);
+ result = copy(source[key], null, stackSource, stackDest);
+ if (isObject(source[key])) {
+ stackSource.push(source[key]);
+ stackDest.push(result);
+ }
+ destination[key] = result;
}
setHashKey(destination,h);
}
+
}
return destination;
}
/**
- * Create a shallow copy of an object
+ * Creates a shallow copy of an object, an array or a primitive
*/
function shallowCopy(src, dst) {
- dst = dst || {};
+ if (isArray(src)) {
+ dst = dst || [];
- for(var key in src) {
- // shallowCopy is only ever called by $compile nodeLinkFn, which has control over src
- // so we don't need to worry about using our custom hasOwnProperty here
- if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
+ for ( var i = 0; i < src.length; i++) {
+ dst[i] = src[i];
+ }
+ } else if (isObject(src)) {
+ dst = dst || {};
+
+ for (var key in src) {
+ if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
}
}
- return dst;
+ return dst || src;
}
@@ -10694,7 +10737,7 @@ function shallowCopy(src, dst) {
* @ngdoc function
* @name angular.equals
* @module ng
- * @function
+ * @kind function
*
* @description
* Determines if two objects or two values are equivalent. Supports value types, regular
@@ -10706,7 +10749,7 @@ function shallowCopy(src, dst) {
* * Both objects or values are of the same type and all of their properties are equal by
* comparing them with `angular.equals`.
* * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
- * * Both values represent the same regular expression (In JavasScript,
+ * * Both values represent the same regular expression (In JavaScript,
* /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
* representation matches).
*
@@ -10759,12 +10802,25 @@ function equals(o1, o2) {
return false;
}
+var csp = function() {
+ if (isDefined(csp.isActive_)) return csp.isActive_;
+
+ var active = !!(document.querySelector('[ng-csp]') ||
+ document.querySelector('[data-ng-csp]'));
+
+ if (!active) {
+ try {
+ /* jshint -W031, -W054 */
+ new Function('');
+ /* jshint +W031, +W054 */
+ } catch (e) {
+ active = true;
+ }
+ }
+
+ return (csp.isActive_ = active);
+};
-function csp() {
- return (document.securityPolicy && document.securityPolicy.isActive) ||
- (document.querySelector &&
- !!(document.querySelector('[ng-csp]') || document.querySelector('[data-ng-csp]')));
-}
function concat(array1, array2, index) {
@@ -10781,7 +10837,7 @@ function sliceArgs(args, startIndex) {
* @ngdoc function
* @name angular.bind
* @module ng
- * @function
+ * @kind function
*
* @description
* Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
@@ -10837,7 +10893,7 @@ function toJsonReplacer(key, value) {
* @ngdoc function
* @name angular.toJson
* @module ng
- * @function
+ * @kind function
*
* @description
* Serializes input into a JSON-formatted string. Properties with leading $ characters will be
@@ -10857,7 +10913,7 @@ function toJson(obj, pretty) {
* @ngdoc function
* @name angular.fromJson
* @module ng
- * @function
+ * @kind function
*
* @description
* Deserializes a JSON string.
@@ -10934,13 +10990,13 @@ function tryDecodeURIComponent(value) {
*/
function parseKeyValue(/**string*/keyValue) {
var obj = {}, key_value, key;
- forEach((keyValue || "").split('&'), function(keyValue){
+ forEach((keyValue || "").split('&'), function(keyValue) {
if ( keyValue ) {
- key_value = keyValue.split('=');
+ key_value = keyValue.replace(/\+/g,'%20').split('=');
key = tryDecodeURIComponent(key_value[0]);
if ( isDefined(key) ) {
var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
- if (!obj[key]) {
+ if (!hasOwnProperty.call(obj, key)) {
obj[key] = val;
} else if(isArray(obj[key])) {
obj[key].push(val);
@@ -11114,7 +11170,7 @@ function angularInit(element, bootstrap) {
*
* Angular will detect if it has been loaded into the browser more than once and only allow the
* first loaded script to be bootstrapped and will report a warning to the browser console for
- * each of the subsequent scripts. This prevents strange results in applications, where otherwise
+ * each of the subsequent scripts. This prevents strange results in applications, where otherwise
* multiple instances of Angular try to work on the DOM.
*
*
@@ -11196,7 +11252,7 @@ function bootstrap(element, modules) {
}
var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator){
+function snake_case(name, separator) {
separator = separator || '_';
return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
return (pos ? separator : '') + letter.toLowerCase();
@@ -11206,8 +11262,9 @@ function snake_case(name, separator){
function bindJQuery() {
// bind to jQuery if present;
jQuery = window.jQuery;
- // reset to jQuery or default to us.
- if (jQuery) {
+ // Use jQuery if it exists with proper functionality, otherwise default to us.
+ // Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support.
+ if (jQuery && jQuery.fn.on) {
jqLite = jQuery;
extend(jQuery.fn, {
scope: JQLitePrototype.scope,
@@ -11243,7 +11300,7 @@ function assertArgFn(arg, name, acceptArrayAnnotation) {
}
assertArg(isFunction(arg), name, 'not a function, got ' +
- (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
+ (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
return arg;
}
@@ -11353,7 +11410,7 @@ function setupModuleLoader(window) {
*
* # Module
*
- * A module is a collection of services, directives, filters, and configuration information.
+ * A module is a collection of services, directives, controllers, filters, and configuration information.
* `angular.module` is used to configure the {@link auto.$injector $injector}.
*
* ```js
@@ -11381,9 +11438,9 @@ function setupModuleLoader(window) {
* {@link angular.bootstrap} to simplify this process for you.
*
* @param {!string} name The name of the module to create or retrieve.
-<<<<<* @param {!Array.=} requires If specified then new module is being created. If
->>>>>* unspecified then the module is being retrieved for further configuration.
- * @param {Function} configFn Optional configuration function for the module. Same as
+ * @param {!Array.=} requires If specified then new module is being created. If
+ * unspecified then the module is being retrieved for further configuration.
+ * @param {Function=} configFn Optional configuration function for the module. Same as
* {@link angular.Module#config Module#config()}.
* @returns {module} new module with the {@link angular.Module} api.
*/
@@ -11575,6 +11632,8 @@ function setupModuleLoader(window) {
* configuration.
* @description
* Use this method to register work which needs to be performed on module loading.
+ * For more about how to configure services, see
+ * {@link providers#providers_provider-recipe Provider Recipe}.
*/
config: config,
@@ -11618,12 +11677,11 @@ function setupModuleLoader(window) {
}
-/* global
- angularModule: true,
- version: true,
+/* global angularModule: true,
+ version: true,
- $LocaleProvider,
- $CompileProvider,
+ $LocaleProvider,
+ $CompileProvider,
htmlAnchorDirective,
inputDirective,
@@ -11711,11 +11769,11 @@ function setupModuleLoader(window) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.2.16', // all of these placeholder strings will be replaced by grunt's
+ full: '1.2.21', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 2,
- dot: 16,
- codeName: 'badger-enumeration'
+ dot: 21,
+ codeName: 'wizard-props'
};
@@ -11839,12 +11897,10 @@ function publishExternalAPI(angular){
]);
}
-/* global
-
- -JQLitePrototype,
- -addEventListenerFn,
- -removeEventListenerFn,
- -BOOLEAN_ATTR
+/* global JQLitePrototype: true,
+ addEventListenerFn: true,
+ removeEventListenerFn: true,
+ BOOLEAN_ATTR: true
*/
//////////////////////////////////
@@ -11855,7 +11911,7 @@ function publishExternalAPI(angular){
* @ngdoc function
* @name angular.element
* @module ng
- * @function
+ * @kind function
*
* @description
* Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
@@ -11937,8 +11993,9 @@ function publishExternalAPI(angular){
* @returns {Object} jQuery object.
*/
+JQLite.expando = 'ng339';
+
var jqCache = JQLite.cache = {},
- jqName = JQLite.expando = 'ng-' + new Date().getTime(),
jqId = 1,
addEventListenerFn = (window.document.addEventListener
? function(element, type, fn) {element.addEventListener(type, fn, false);}
@@ -12148,7 +12205,7 @@ function jqLiteOff(element, type, fn, unsupported) {
}
function jqLiteRemoveData(element, name) {
- var expandoId = element[jqName],
+ var expandoId = element.ng339,
expandoStore = jqCache[expandoId];
if (expandoStore) {
@@ -12162,17 +12219,17 @@ function jqLiteRemoveData(element, name) {
jqLiteOff(element);
}
delete jqCache[expandoId];
- element[jqName] = undefined; // ie does not allow deletion of attributes on elements.
+ element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
}
}
function jqLiteExpandoStore(element, key, value) {
- var expandoId = element[jqName],
+ var expandoId = element.ng339,
expandoStore = jqCache[expandoId || -1];
if (isDefined(value)) {
if (!expandoStore) {
- element[jqName] = expandoId = jqNextId();
+ element.ng339 = expandoId = jqNextId();
expandoStore = jqCache[expandoId] = {};
}
expandoStore[key] = value;
@@ -12257,25 +12314,22 @@ function jqLiteController(element, name) {
}
function jqLiteInheritedData(element, name, value) {
- element = jqLite(element);
-
// if element is the document object work with the html element instead
// this makes $(document).scope() possible
- if(element[0].nodeType == 9) {
- element = element.find('html');
+ if(element.nodeType == 9) {
+ element = element.documentElement;
}
var names = isArray(name) ? name : [name];
- while (element.length) {
- var node = element[0];
+ while (element) {
for (var i = 0, ii = names.length; i < ii; i++) {
- if ((value = element.data(names[i])) !== undefined) return value;
+ if ((value = jqLite.data(element, names[i])) !== undefined) return value;
}
// If dealing with a document fragment node with a host element, and no parent, use the host
// element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
// to lookup parent controllers.
- element = jqLite(node.parentNode || (node.nodeType === 11 && node.host));
+ element = element.parentNode || (element.nodeType === 11 && element.host);
}
}
@@ -12350,18 +12404,25 @@ function getBooleanAttrName(element, name) {
return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
}
+forEach({
+ data: jqLiteData,
+ removeData: jqLiteRemoveData
+}, function(fn, name) {
+ JQLite[name] = fn;
+});
+
forEach({
data: jqLiteData,
inheritedData: jqLiteInheritedData,
scope: function(element) {
// Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite(element).data('$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
+ return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
},
isolateScope: function(element) {
// Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate');
+ return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
},
controller: jqLiteController,
@@ -12491,6 +12552,7 @@ forEach({
*/
JQLite.prototype[name] = function(arg1, arg2) {
var i, key;
+ var nodeCount = this.length;
// jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
// in a way that survives minification.
@@ -12500,7 +12562,7 @@ forEach({
if (isObject(arg1)) {
// we are a write, but the object properties are the key/values
- for (i = 0; i < this.length; i++) {
+ for (i = 0; i < nodeCount; i++) {
if (fn === jqLiteData) {
// data() takes the whole object in jQuery
fn(this[i], arg1);
@@ -12514,9 +12576,10 @@ forEach({
return this;
} else {
// we are a read, so read the first child.
+ // TODO: do we still need this?
var value = fn.$dv;
// Only if we have $dv do we iterate over all, otherwise it is just the first element.
- var jj = (value === undefined) ? Math.min(this.length, 1) : this.length;
+ var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;
for (var j = 0; j < jj; j++) {
var nodeValue = fn(this[j], arg1, arg2);
value = value ? value + nodeValue : nodeValue;
@@ -12525,7 +12588,7 @@ forEach({
}
} else {
// we are a write, so apply to all children
- for (i = 0; i < this.length; i++) {
+ for (i = 0; i < nodeCount; i++) {
fn(this[i], arg1, arg2);
}
// return self for chaining
@@ -12787,7 +12850,9 @@ forEach({
clone: jqLiteClone,
triggerHandler: function(element, eventName, eventData) {
- var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName];
+ // Copy event handlers in case event handlers array is modified during execution.
+ var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName],
+ eventFnsCopy = shallowCopy(eventFns || []);
eventData = eventData || [];
@@ -12796,7 +12861,7 @@ forEach({
stopPropagation: noop
}];
- forEach(eventFns, function(fn) {
+ forEach(eventFnsCopy, function(fn) {
fn.apply(element, event.concat(eventData));
});
}
@@ -12837,16 +12902,16 @@ forEach({
* @returns {string} hash string such that the same input will have the same hash string.
* The resulting string key is in 'type:hashKey' format.
*/
-function hashKey(obj) {
+function hashKey(obj, nextUidFn) {
var objType = typeof obj,
key;
- if (objType == 'object' && obj !== null) {
+ if (objType == 'function' || (objType == 'object' && obj !== null)) {
if (typeof (key = obj.$$hashKey) == 'function') {
// must invoke on object to keep the right this
key = obj.$$hashKey();
} else if (key === undefined) {
- key = obj.$$hashKey = nextUid();
+ key = obj.$$hashKey = (nextUidFn || nextUid)();
}
} else {
key = obj;
@@ -12858,7 +12923,13 @@ function hashKey(obj) {
/**
* HashMap which can use objects as keys
*/
-function HashMap(array){
+function HashMap(array, isolatedUid) {
+ if (isolatedUid) {
+ var uid = 0;
+ this.nextUid = function() {
+ return ++uid;
+ };
+ }
forEach(array, this.put, this);
}
HashMap.prototype = {
@@ -12868,7 +12939,7 @@ HashMap.prototype = {
* @param value value to store can be any type
*/
put: function(key, value) {
- this[hashKey(key)] = value;
+ this[hashKey(key, this.nextUid)] = value;
},
/**
@@ -12876,7 +12947,7 @@ HashMap.prototype = {
* @returns {Object} the value for the key
*/
get: function(key) {
- return this[hashKey(key)];
+ return this[hashKey(key, this.nextUid)];
},
/**
@@ -12884,7 +12955,7 @@ HashMap.prototype = {
* @param key
*/
remove: function(key) {
- var value = this[key = hashKey(key)];
+ var value = this[key = hashKey(key, this.nextUid)];
delete this[key];
return value;
}
@@ -12894,7 +12965,7 @@ HashMap.prototype = {
* @ngdoc function
* @module ng
* @name angular.injector
- * @function
+ * @kind function
*
* @description
* Creates an injector function that can be used for retrieving services as well as for
@@ -12921,7 +12992,7 @@ HashMap.prototype = {
*
* Sometimes you want to get access to the injector of a currently running Angular app
* from outside Angular. Perhaps, you want to inject and compile some markup after the
- * application has been bootstrapped. You can do this using extra `injector()` added
+ * application has been bootstrapped. You can do this using the extra `injector()` added
* to JQuery/jqLite elements. See {@link angular.element}.
*
* *This is fairly rare but could be the case if a third party library is injecting the
@@ -12962,7 +13033,7 @@ function annotate(fn) {
argDecl,
last;
- if (typeof fn == 'function') {
+ if (typeof fn === 'function') {
if (!($inject = fn.$inject)) {
$inject = [];
if (fn.length) {
@@ -12991,7 +13062,7 @@ function annotate(fn) {
/**
* @ngdoc service
* @name $injector
- * @function
+ * @kind function
*
* @description
*
@@ -13034,7 +13105,7 @@ function annotate(fn) {
* minification, and obfuscation tools since these tools change the argument names.
*
* ## `$inject` Annotation
- * By adding a `$inject` property onto a function the injection parameters can be specified.
+ * By adding an `$inject` property onto a function the injection parameters can be specified.
*
* ## Inline
* As an array of injection names, where the last item in the array is the function to call.
@@ -13071,7 +13142,7 @@ function annotate(fn) {
* @name $injector#has
*
* @description
- * Allows the user to query if the particular service exist.
+ * Allows the user to query if the particular service exists.
*
* @param {string} Name of the service to query.
* @returns {boolean} returns true if injector has given service.
@@ -13081,8 +13152,8 @@ function annotate(fn) {
* @ngdoc method
* @name $injector#instantiate
* @description
- * Create a new instance of JS type. The method takes a constructor function invokes the new
- * operator and supplies all of the arguments to the constructor function as specified by the
+ * Create a new instance of JS type. The method takes a constructor function, invokes the new
+ * operator, and supplies all of the arguments to the constructor function as specified by the
* constructor annotation.
*
* @param {Function} Type Annotated constructor function.
@@ -13175,7 +13246,7 @@ function annotate(fn) {
/**
- * @ngdoc object
+ * @ngdoc service
* @name $provide
*
* @description
@@ -13481,7 +13552,7 @@ function createInjector(modulesToLoad) {
var INSTANTIATING = {},
providerSuffix = 'Provider',
path = [],
- loadedModules = new HashMap(),
+ loadedModules = new HashMap([], true),
providerCache = {
$provide: {
provider: supportObject(provider),
@@ -13614,7 +13685,8 @@ function createInjector(modulesToLoad) {
function getService(serviceName) {
if (cache.hasOwnProperty(serviceName)) {
if (cache[serviceName] === INSTANTIATING) {
- throw $injectorMinErr('cdep', 'Circular dependency found: {0}', path.join(' <- '));
+ throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
+ serviceName + ' <- ' + path.join(' <- '));
}
return cache[serviceName];
} else {
@@ -13651,8 +13723,7 @@ function createInjector(modulesToLoad) {
: getService(key)
);
}
- if (!fn.$inject) {
- // this means that we must be an array.
+ if (isArray(fn)) {
fn = fn[length];
}
@@ -13695,7 +13766,7 @@ function createInjector(modulesToLoad) {
* @requires $rootScope
*
* @description
- * When called, it checks current value of `$location.hash()` and scroll to related element,
+ * When called, it checks current value of `$location.hash()` and scrolls to the related element,
* according to rules specified in
* [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).
*
@@ -13897,7 +13968,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @ngdoc method
* @name $animate#enter
- * @function
+ * @kind function
* @description Inserts the element into the DOM either after the `after` element or within
* the `parent` element. Once complete, the done() callback will be fired (if provided).
* @param {DOMElement} element the element which will be inserted into the DOM
@@ -13924,7 +13995,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @ngdoc method
* @name $animate#leave
- * @function
+ * @kind function
* @description Removes the element from the DOM. Once complete, the done() callback will be
* fired (if provided).
* @param {DOMElement} element the element which will be removed from the DOM
@@ -13940,7 +14011,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @ngdoc method
* @name $animate#move
- * @function
+ * @kind function
* @description Moves the position of the provided element within the DOM to be placed
* either after the `after` element or inside of the `parent` element. Once complete, the
* done() callback will be fired (if provided).
@@ -13964,7 +14035,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @ngdoc method
* @name $animate#addClass
- * @function
+ * @kind function
* @description Adds the provided className CSS class value to the provided element. Once
* complete, the done() callback will be fired (if provided).
* @param {DOMElement} element the element which will have the className value
@@ -13987,7 +14058,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @ngdoc method
* @name $animate#removeClass
- * @function
+ * @kind function
* @description Removes the provided className CSS class value from the provided element.
* Once complete, the done() callback will be fired (if provided).
* @param {DOMElement} element the element which will have the className value
@@ -14010,10 +14081,10 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @ngdoc method
* @name $animate#setClass
- * @function
+ * @kind function
* @description Adds and/or removes the given CSS classes to and from the element.
* Once complete, the done() callback will be fired (if provided).
- * @param {DOMElement} element the element which will it's CSS classes changed
+ * @param {DOMElement} element the element which will have its CSS classes changed
* removed from it
* @param {string} add the CSS classes which will be added to the element
* @param {string} remove the CSS class which will be removed from the element
@@ -14567,7 +14638,7 @@ function $CacheFactoryProvider() {
/**
* @ngdoc method
* @name $cacheFactory.Cache#put
- * @function
+ * @kind function
*
* @description
* Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
@@ -14603,7 +14674,7 @@ function $CacheFactoryProvider() {
/**
* @ngdoc method
* @name $cacheFactory.Cache#get
- * @function
+ * @kind function
*
* @description
* Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
@@ -14627,7 +14698,7 @@ function $CacheFactoryProvider() {
/**
* @ngdoc method
* @name $cacheFactory.Cache#remove
- * @function
+ * @kind function
*
* @description
* Removes an entry from the {@link $cacheFactory.Cache Cache} object.
@@ -14655,7 +14726,7 @@ function $CacheFactoryProvider() {
/**
* @ngdoc method
* @name $cacheFactory.Cache#removeAll
- * @function
+ * @kind function
*
* @description
* Clears the cache object of any entries.
@@ -14671,7 +14742,7 @@ function $CacheFactoryProvider() {
/**
* @ngdoc method
* @name $cacheFactory.Cache#destroy
- * @function
+ * @kind function
*
* @description
* Destroys the {@link $cacheFactory.Cache Cache} object entirely,
@@ -14688,7 +14759,7 @@ function $CacheFactoryProvider() {
/**
* @ngdoc method
* @name $cacheFactory.Cache#info
- * @function
+ * @kind function
*
* @description
* Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
@@ -14743,7 +14814,7 @@ function $CacheFactoryProvider() {
* @name $cacheFactory#info
*
* @description
- * Get information about all the of the caches that have been created
+ * Get information about all the caches that have been created
*
* @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
*/
@@ -14844,7 +14915,7 @@ function $TemplateCacheProvider() {
/**
* @ngdoc service
* @name $compile
- * @function
+ * @kind function
*
* @description
* Compiles an HTML string or DOM into a template and produces a template function, which
@@ -14882,7 +14953,6 @@ function $TemplateCacheProvider() {
* template: '', // or // function(tElement, tAttrs) { ... },
* // or
* // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
- * replace: false,
* transclude: false,
* restrict: 'A',
* scope: false,
@@ -14986,7 +15056,7 @@ function $TemplateCacheProvider() {
* local name. Given `` and widget definition of
* `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
* a function wrapper for the `count = count + value` expression. Often it's desirable to
- * pass data from the isolated scope via an expression and to the parent scope, this can be
+ * pass data from the isolated scope via an expression to the parent scope, this can be
* done by passing a map of local variable names and values into the expression wrapper fn.
* For example, if the expression is `increment(amount)` then we can specify the amount value
* by calling the `localFn` as `localFn({amount: 22})`.
@@ -15037,14 +15107,16 @@ function $TemplateCacheProvider() {
*
*
* #### `template`
- * replace the current element with the contents of the HTML. The replacement process
- * migrates all of the attributes / classes from the old element to the new one. See the
- * {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive
- * Directives Guide} for an example.
+ * HTML markup that may:
+ * * Replace the contents of the directive's element (defualt).
+ * * Replace the directive's element itself (if `replace` is true - DEPRECATED).
+ * * Wrap the contents of the directive's element (if `transclude` is true).
*
- * You can specify `template` as a string representing the template or as a function which takes
- * two arguments `tElement` and `tAttrs` (described in the `compile` function api below) and
- * returns a string value representing the template.
+ * Value may be:
+ *
+ * * A string. For example `
{{delete_str}}
`.
+ * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
+ * function api below) and returns a string value.
*
*
* #### `templateUrl`
@@ -15058,12 +15130,15 @@ function $TemplateCacheProvider() {
* api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
*
*
- * #### `replace`
- * specify where the template should be inserted. Defaults to `false`.
+ * #### `replace` ([*DEPRECATED*!], will be removed in next major release)
+ * specify what the template should replace. Defaults to `false`.
*
- * * `true` - the template will replace the current element.
- * * `false` - the template will replace the contents of the current element.
+ * * `true` - the template will replace the directive's element.
+ * * `false` - the template will replace the contents of the directive's element.
*
+ * The replacement process migrates all of the attributes / classes from the old element to the new
+ * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive
+ * Directives Guide} for an example.
*
* #### `transclude`
* compile the content of the element and make it available to the directive.
@@ -15077,6 +15152,11 @@ function $TemplateCacheProvider() {
* * `true` - transclude the content of the directive.
* * `'element'` - transclude the whole element including any directives defined at lower priority.
*
+ *
+ * **Note:** When testing an element transclude directive you must not place the directive at the root of the
+ * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
+ * Testing Transclusion Directives}.
+ *
*
* #### `compile`
*
@@ -15085,11 +15165,7 @@ function $TemplateCacheProvider() {
* ```
*
* The compile function deals with transforming the template DOM. Since most directives do not do
- * template transformation, it is not used often. Examples that require compile functions are
- * directives that transform template DOM, such as {@link
- * api/ng.directive:ngRepeat ngRepeat}, or load the contents
- * asynchronously, such as {@link ngRoute.directive:ngView ngView}. The
- * compile function takes the following arguments.
+ * template transformation, it is not used often. The compile function takes the following arguments:
*
* * `tElement` - template element - The element where the directive has been declared. It is
* safe to do template transformation on the element and child elements only.
@@ -15217,10 +15293,10 @@ function $TemplateCacheProvider() {
* to illustrate how `$compile` works.
*
*
-
+
-
+
@@ -15327,7 +15402,7 @@ var $compileMinErr = minErr('$compile');
/**
* @ngdoc provider
* @name $compileProvider
- * @function
+ * @kind function
*
* @description
*/
@@ -15335,8 +15410,8 @@ $CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
function $CompileProvider($provide, $$sanitizeUriProvider) {
var hasDirectives = {},
Suffix = 'Directive',
- COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
- CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/;
+ COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,
+ CLASS_DIRECTIVE_REGEXP = /(([\d\w_\-]+)(?:\:([^;]+))?;?)/;
// Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
// The assumption is that future DOM event attribute names will begin with
@@ -15346,7 +15421,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compileProvider#directive
- * @function
+ * @kind function
*
* @description
* Register a new directive with the compiler.
@@ -15399,7 +15474,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compileProvider#aHrefSanitizationWhitelist
- * @function
+ * @kind function
*
* @description
* Retrieves or overrides the default regular expression that is used for whitelisting of safe
@@ -15429,7 +15504,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compileProvider#imgSrcSanitizationWhitelist
- * @function
+ * @kind function
*
* @description
* Retrieves or overrides the default regular expression that is used for whitelisting of safe
@@ -15473,7 +15548,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compile.directive.Attributes#$addClass
- * @function
+ * @kind function
*
* @description
* Adds the CSS class value specified by the classVal parameter to the element. If animations
@@ -15490,7 +15565,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compile.directive.Attributes#$removeClass
- * @function
+ * @kind function
*
* @description
* Removes the CSS class value specified by the classVal parameter from the element. If
@@ -15507,7 +15582,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compile.directive.Attributes#$updateClass
- * @function
+ * @kind function
*
* @description
* Adds and removes the appropriate CSS class values to the element based on the difference
@@ -15595,7 +15670,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
/**
* @ngdoc method
* @name $compile.directive.Attributes#$observe
- * @function
+ * @kind function
*
* @description
* Observes an interpolated attribute.
@@ -15658,7 +15733,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
compileNodes($compileNodes, transcludeFn, $compileNodes,
maxPriority, ignoreDirective, previousCompileContext);
safeAddClass($compileNodes, 'ng-scope');
- return function publicLinkFn(scope, cloneConnectFn, transcludeControllers){
+ return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn){
assertArg(scope, 'scope');
// important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
// and sometimes changes the structure of the DOM.
@@ -15680,7 +15755,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
if (cloneConnectFn) cloneConnectFn($linkNode, scope);
- if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode);
+ if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);
return $linkNode;
};
}
@@ -15727,7 +15802,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
: null;
if (nodeLinkFn && nodeLinkFn.scope) {
- safeAddClass(jqLite(nodeList[i]), 'ng-scope');
+ safeAddClass(attrs.$$element, 'ng-scope');
}
childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||
@@ -15735,7 +15810,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
!childNodes.length)
? null
: compileNodes(childNodes,
- nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);
+ nodeLinkFn ? (
+ (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)
+ && nodeLinkFn.transclude) : transcludeFn);
linkFns.push(nodeLinkFn, childLinkFn);
linkFnFound = linkFnFound || nodeLinkFn || childLinkFn;
@@ -15746,8 +15823,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// return a linking function if we have found anything, null otherwise
return linkFnFound ? compositeLinkFn : null;
- function compositeLinkFn(scope, nodeList, $rootElement, boundTranscludeFn) {
- var nodeLinkFn, childLinkFn, node, $node, childScope, childTranscludeFn, i, ii, n;
+ function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
+ var nodeLinkFn, childLinkFn, node, childScope, i, ii, n, childBoundTranscludeFn;
// copy nodeList so that linking doesn't break due to live list updates.
var nodeListLength = nodeList.length,
@@ -15760,32 +15837,40 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
node = stableNodeList[n];
nodeLinkFn = linkFns[i++];
childLinkFn = linkFns[i++];
- $node = jqLite(node);
if (nodeLinkFn) {
if (nodeLinkFn.scope) {
childScope = scope.$new();
- $node.data('$scope', childScope);
+ jqLite.data(node, '$scope', childScope);
} else {
childScope = scope;
}
- childTranscludeFn = nodeLinkFn.transclude;
- if (childTranscludeFn || (!boundTranscludeFn && transcludeFn)) {
- nodeLinkFn(childLinkFn, childScope, node, $rootElement,
- createBoundTranscludeFn(scope, childTranscludeFn || transcludeFn)
- );
+
+ if ( nodeLinkFn.transcludeOnThisElement ) {
+ childBoundTranscludeFn = createBoundTranscludeFn(scope, nodeLinkFn.transclude, parentBoundTranscludeFn);
+
+ } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {
+ childBoundTranscludeFn = parentBoundTranscludeFn;
+
+ } else if (!parentBoundTranscludeFn && transcludeFn) {
+ childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);
+
} else {
- nodeLinkFn(childLinkFn, childScope, node, $rootElement, boundTranscludeFn);
+ childBoundTranscludeFn = null;
}
+
+ nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);
+
} else if (childLinkFn) {
- childLinkFn(scope, node.childNodes, undefined, boundTranscludeFn);
+ childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
}
}
}
}
- function createBoundTranscludeFn(scope, transcludeFn) {
- return function boundTranscludeFn(transcludedScope, cloneFn, controllers) {
+ function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
+
+ var boundTranscludeFn = function(transcludedScope, cloneFn, controllers) {
var scopeCreated = false;
if (!transcludedScope) {
@@ -15794,12 +15879,14 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
scopeCreated = true;
}
- var clone = transcludeFn(transcludedScope, cloneFn, controllers);
+ var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn);
if (scopeCreated) {
- clone.on('$destroy', bind(transcludedScope, transcludedScope.$destroy));
+ clone.on('$destroy', function() { transcludedScope.$destroy(); });
}
return clone;
};
+
+ return boundTranscludeFn;
}
/**
@@ -15825,7 +15912,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority, ignoreDirective);
// iterate over the attributes
- for (var attr, name, nName, ngAttrName, value, nAttrs = node.attributes,
+ for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {
var attrStartName = false;
var attrEndName = false;
@@ -15833,9 +15920,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
attr = nAttrs[j];
if (!msie || msie >= 8 || attr.specified) {
name = attr.name;
+ value = trim(attr.value);
+
// support ngAttr attribute binding
ngAttrName = directiveNormalize(name);
- if (NG_ATTR_BINDING.test(ngAttrName)) {
+ if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
name = snake_case(ngAttrName.substr(6), '-');
}
@@ -15848,9 +15937,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
nName = directiveNormalize(name.toLowerCase());
attrsMap[nName] = name;
- attrs[nName] = value = trim(attr.value);
- if (getBooleanAttrName(node, nName)) {
- attrs[nName] = true; // presence means true
+ if (isNgAttr || !attrs.hasOwnProperty(nName)) {
+ attrs[nName] = value;
+ if (getBooleanAttrName(node, nName)) {
+ attrs[nName] = true; // presence means true
+ }
}
addAttrInterpolateDirective(node, directives, value, nName);
addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
@@ -15977,6 +16068,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
templateDirective = previousCompileContext.templateDirective,
nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,
hasTranscludeDirective = false,
+ hasTemplate = false,
hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,
$compileNode = templateAttrs.$$element = jqLite(compileNode),
directive,
@@ -16041,12 +16133,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if (directiveValue == 'element') {
hasElementTranscludeDirective = true;
terminalPriority = directive.priority;
- $template = groupScan(compileNode, attrStart, attrEnd);
+ $template = $compileNode;
$compileNode = templateAttrs.$$element =
jqLite(document.createComment(' ' + directiveName + ': ' +
templateAttrs[directiveName] + ' '));
compileNode = $compileNode[0];
- replaceWith(jqCollection, jqLite(sliceArgs($template)), compileNode);
+ replaceWith(jqCollection, sliceArgs($template), compileNode);
childTranscludeFn = compile($template, transcludeFn, terminalPriority,
replaceDirective && replaceDirective.name, {
@@ -16067,6 +16159,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
if (directive.template) {
+ hasTemplate = true;
assertNoDuplicate('template', templateDirective, directive, $compileNode);
templateDirective = directive;
@@ -16081,7 +16174,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if (jqLiteIsTextNode(directiveValue)) {
$template = [];
} else {
- $template = jqLite(directiveValue);
+ $template = jqLite(trim(directiveValue));
}
compileNode = $template[0];
@@ -16116,6 +16209,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
if (directive.templateUrl) {
+ hasTemplate = true;
assertNoDuplicate('template', templateDirective, directive, $compileNode);
templateDirective = directive;
@@ -16124,7 +16218,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,
- templateAttrs, jqCollection, childTranscludeFn, preLinkFns, postLinkFns, {
+ templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {
controllerDirectives: controllerDirectives,
newIsolateScopeDirective: newIsolateScopeDirective,
templateDirective: templateDirective,
@@ -16152,7 +16246,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;
- nodeLinkFn.transclude = hasTranscludeDirective && childTranscludeFn;
+ nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;
+ nodeLinkFn.templateOnThisElement = hasTemplate;
+ nodeLinkFn.transclude = childTranscludeFn;
+
previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;
// might be normal or delayed nodeLinkFn depending on if templateUrl is present
@@ -16164,6 +16261,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if (pre) {
if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);
pre.require = directive.require;
+ pre.directiveName = directiveName;
if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
pre = cloneAndAnnotateFn(pre, {isolateScope: true});
}
@@ -16172,6 +16270,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if (post) {
if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);
post.require = directive.require;
+ post.directiveName = directiveName;
if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
post = cloneAndAnnotateFn(post, {isolateScope: true});
}
@@ -16180,7 +16279,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
- function getControllers(require, $element, elementControllers) {
+ function getControllers(directiveName, require, $element, elementControllers) {
var value, retrievalMethod = 'data', optional = false;
if (isString(require)) {
while((value = require.charAt(0)) == '^' || value == '?') {
@@ -16206,7 +16305,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
} else if (isArray(require)) {
value = [];
forEach(require, function(require) {
- value.push(getControllers(require, $element, elementControllers));
+ value.push(getControllers(directiveName, require, $element, elementControllers));
});
}
return value;
@@ -16216,28 +16315,26 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
var attrs, $element, i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;
- if (compileNode === linkNode) {
- attrs = templateAttrs;
- } else {
- attrs = shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));
- }
+ attrs = (compileNode === linkNode)
+ ? templateAttrs
+ : shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));
$element = attrs.$$element;
if (newIsolateScopeDirective) {
var LOCAL_REGEXP = /^\s*([@=&])(\??)\s*(\w*)\s*$/;
- var $linkNode = jqLite(linkNode);
isolateScope = scope.$new(true);
- if (templateDirective && (templateDirective === newIsolateScopeDirective.$$originalDirective)) {
- $linkNode.data('$isolateScope', isolateScope) ;
+ if (templateDirective && (templateDirective === newIsolateScopeDirective ||
+ templateDirective === newIsolateScopeDirective.$$originalDirective)) {
+ $element.data('$isolateScope', isolateScope);
} else {
- $linkNode.data('$isolateScopeNoTemplate', isolateScope);
+ $element.data('$isolateScopeNoTemplate', isolateScope);
}
- safeAddClass($linkNode, 'ng-isolate-scope');
+ safeAddClass($element, 'ng-isolate-scope');
forEach(newIsolateScopeDirective.scope, function(definition, scopeName) {
var match = definition.match(LOCAL_REGEXP) || [],
@@ -16349,7 +16446,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
try {
linkFn = preLinkFns[i];
linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,
- linkFn.require && getControllers(linkFn.require, $element, elementControllers), transcludeFn);
+ linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), transcludeFn);
} catch (e) {
$exceptionHandler(e, startingTag($element));
}
@@ -16369,7 +16466,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
try {
linkFn = postLinkFns[i];
linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,
- linkFn.require && getControllers(linkFn.require, $element, elementControllers), transcludeFn);
+ linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), transcludeFn);
} catch (e) {
$exceptionHandler(e, startingTag($element));
}
@@ -16455,7 +16552,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// reapply the old attributes to the new element
forEach(dst, function(value, key) {
if (key.charAt(0) != '$') {
- if (src[key]) {
+ if (src[key] && src[key] !== value) {
value += (key === 'style' ? ';' : ' ') + src[key];
}
dst.$set(key, value, true, srcAttr[key]);
@@ -16508,7 +16605,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
if (jqLiteIsTextNode(content)) {
$template = [];
} else {
- $template = jqLite(content);
+ $template = jqLite(trim(content));
}
compileNode = $template[0];
@@ -16544,7 +16641,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
});
afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);
-
while(linkQueue.length) {
var scope = linkQueue.shift(),
beforeTemplateLinkNode = linkQueue.shift(),
@@ -16566,8 +16662,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// Copy in CSS classes from original node
safeAddClass(jqLite(linkNode), oldClasses);
}
- if (afterTemplateNodeLinkFn.transclude) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude);
+ if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
+ childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
} else {
childBoundTranscludeFn = boundTranscludeFn;
}
@@ -16581,13 +16677,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
});
return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {
+ var childBoundTranscludeFn = boundTranscludeFn;
if (linkQueue) {
linkQueue.push(scope);
linkQueue.push(node);
linkQueue.push(rootElement);
- linkQueue.push(boundTranscludeFn);
+ linkQueue.push(childBoundTranscludeFn);
} else {
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, boundTranscludeFn);
+ if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
+ childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
+ }
+ afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);
}
};
}
@@ -16612,23 +16712,31 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
- function addTextInterpolateDirective(directives, text) {
- var interpolateFn = $interpolate(text, true);
- if (interpolateFn) {
- directives.push({
- priority: 0,
- compile: valueFn(function textInterpolateLinkFn(scope, node) {
- var parent = node.parent(),
- bindings = parent.data('$binding') || [];
- bindings.push(interpolateFn);
- safeAddClass(parent.data('$binding', bindings), 'ng-binding');
- scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
- node[0].nodeValue = value;
- });
- })
- });
+ function addTextInterpolateDirective(directives, text) {
+ var interpolateFn = $interpolate(text, true);
+ if (interpolateFn) {
+ directives.push({
+ priority: 0,
+ compile: function textInterpolateCompileFn(templateNode) {
+ // when transcluding a template that has bindings in the root
+ // then we don't have a parent and should do this in the linkFn
+ var parent = templateNode.parent(), hasCompileParent = parent.length;
+ if (hasCompileParent) safeAddClass(templateNode.parent(), 'ng-binding');
+
+ return function textInterpolateLinkFn(scope, node) {
+ var parent = node.parent(),
+ bindings = parent.data('$binding') || [];
+ bindings.push(interpolateFn);
+ parent.data('$binding', bindings);
+ if (!hasCompileParent) safeAddClass(parent, 'ng-binding');
+ scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
+ node[0].nodeValue = value;
+ });
+ };
+ }
+ });
+ }
}
- }
function getTrustedContext(node, attrNormalizedName) {
@@ -16789,7 +16897,9 @@ function directiveNormalize(name) {
* element attributes. The values reflect current binding state `{{ }}`. The normalization is
* needed since all of these are treated as equivalent in Angular:
*
+ * ```
*
+ * ```
*/
/**
@@ -16803,7 +16913,7 @@ function directiveNormalize(name) {
/**
* @ngdoc method
* @name $compile.directive.Attributes#$set
- * @function
+ * @kind function
*
* @description
* Set DOM element attribute value.
@@ -16926,7 +17036,7 @@ function $ControllerProvider() {
instance = $injector.instantiate(expression, locals);
if (identifier) {
- if (!(locals && typeof locals.$scope == 'object')) {
+ if (!(locals && typeof locals.$scope === 'object')) {
throw minErr('$controller')('noscp',
"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",
constructor || expression.name, identifier);
@@ -16949,18 +17059,19 @@ function $ControllerProvider() {
* A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.
*
* @example
-
+
-
+
$document title:
window.document title:
- function MainCtrl($scope, $document) {
- $scope.title = $document[0].title;
- $scope.windowTitle = angular.element(window.document)[0].title;
- }
+ angular.module('documentExample', [])
+ .controller('ExampleController', ['$scope', '$document', function($scope, $document) {
+ $scope.title = $document[0].title;
+ $scope.windowTitle = angular.element(window.document)[0].title;
+ }]);
*/
@@ -17027,11 +17138,7 @@ function parseHeaders(headers) {
val = trim(line.substr(i + 1));
if (key) {
- if (parsed[key]) {
- parsed[key] += ', ' + val;
- } else {
- parsed[key] = val;
- }
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
}
});
@@ -17093,12 +17200,39 @@ function isSuccess(status) {
}
+/**
+ * @ngdoc provider
+ * @name $httpProvider
+ * @description
+ * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
+ * */
function $HttpProvider() {
var JSON_START = /^\s*(\[|\{[^\{])/,
JSON_END = /[\}\]]\s*$/,
PROTECTION_PREFIX = /^\)\]\}',?\n/,
CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};
+ /**
+ * @ngdoc property
+ * @name $httpProvider#defaults
+ * @description
+ *
+ * Object containing default values for all {@link ng.$http $http} requests.
+ *
+ * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.
+ * Defaults value is `'XSRF-TOKEN'`.
+ *
+ * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the
+ * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.
+ *
+ * - **`defaults.headers`** - {Object} - Default headers for all $http requests.
+ * Refer to {@link ng.$http#setting-http-headers $http} for documentation on
+ * setting default headers.
+ * - **`defaults.headers.common`**
+ * - **`defaults.headers.post`**
+ * - **`defaults.headers.put`**
+ * - **`defaults.headers.patch`**
+ **/
var defaults = this.defaults = {
// transform incoming response data
transformResponse: [function(data) {
@@ -17121,9 +17255,9 @@ function $HttpProvider() {
common: {
'Accept': 'application/json, text/plain, */*'
},
- post: copy(CONTENT_TYPE_APPLICATION_JSON),
- put: copy(CONTENT_TYPE_APPLICATION_JSON),
- patch: copy(CONTENT_TYPE_APPLICATION_JSON)
+ post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
+ put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
+ patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)
},
xsrfCookieName: 'XSRF-TOKEN',
@@ -17365,14 +17499,14 @@ function $HttpProvider() {
*
* There are two kinds of interceptors (and two kinds of rejection interceptors):
*
- * * `request`: interceptors get called with http `config` object. The function is free to
- * modify the `config` or create a new one. The function needs to return the `config`
- * directly or as a promise.
+ * * `request`: interceptors get called with a http `config` object. The function is free to
+ * modify the `config` object or create a new one. The function needs to return the `config`
+ * object directly, or a promise containing the `config` or a new `config` object.
* * `requestError`: interceptor gets called when a previous interceptor threw an error or
* resolved with a rejection.
* * `response`: interceptors get called with http `response` object. The function is free to
- * modify the `response` or create a new one. The function needs to return the `response`
- * directly or as a promise.
+ * modify the `response` object or create a new one. The function needs to return the `response`
+ * object directly, or as a promise containing the `response` or a new `response` object.
* * `responseError`: interceptor gets called when a previous interceptor threw an error or
* resolved with a rejection.
*
@@ -17384,7 +17518,7 @@ function $HttpProvider() {
* // optional method
* 'request': function(config) {
* // do something on success
- * return config || $q.when(config);
+ * return config;
* },
*
* // optional method
@@ -17401,7 +17535,7 @@ function $HttpProvider() {
* // optional method
* 'response': function(response) {
* // do something on success
- * return response || $q.when(response);
+ * return response;
* },
*
* // optional method
@@ -17562,7 +17696,7 @@ function $HttpProvider() {
* caching.
* - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}
* that should abort the request when resolved.
- * - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the
+ * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the
* XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5
* for more information.
* - **responseType** - `{string}` - see
@@ -17588,9 +17722,9 @@ function $HttpProvider() {
*
*
* @example
-
+
-
+
- function FetchCtrl($scope, $http, $templateCache) {
- $scope.method = 'GET';
- $scope.url = 'http-hello.html';
+ angular.module('httpExample', [])
+ .controller('FetchController', ['$scope', '$http', '$templateCache',
+ function($scope, $http, $templateCache) {
+ $scope.method = 'GET';
+ $scope.url = 'http-hello.html';
- $scope.fetch = function() {
- $scope.code = null;
- $scope.response = null;
+ $scope.fetch = function() {
+ $scope.code = null;
+ $scope.response = null;
- $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
- success(function(data, status) {
- $scope.status = status;
- $scope.data = data;
- }).
- error(function(data, status) {
- $scope.data = data || "Request failed";
- $scope.status = status;
- });
- };
+ $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
+ success(function(data, status) {
+ $scope.status = status;
+ $scope.data = data;
+ }).
+ error(function(data, status) {
+ $scope.data = data || "Request failed";
+ $scope.status = status;
+ });
+ };
- $scope.updateModel = function(method, url) {
- $scope.method = method;
- $scope.url = url;
- };
- }
+ $scope.updateModel = function(method, url) {
+ $scope.method = method;
+ $scope.url = url;
+ };
+ }]);
Hello, $http!
@@ -17684,20 +17820,12 @@ function $HttpProvider() {
config.headers = headers;
config.method = uppercase(config.method);
- var xsrfValue = urlIsSameOrigin(config.url)
- ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]
- : undefined;
- if (xsrfValue) {
- headers[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
- }
-
-
var serverRequest = function(config) {
headers = config.headers;
var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);
// strip content-type if data is undefined
- if (isUndefined(config.data)) {
+ if (isUndefined(reqData)) {
forEach(headers, function(value, header) {
if (lowercase(header) === 'content-type') {
delete headers[header];
@@ -17766,10 +17894,6 @@ function $HttpProvider() {
defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);
- // execute if header value is function
- execHeaders(defHeaders);
- execHeaders(reqHeaders);
-
// using for-in instead of forEach to avoid unecessary iteration after header has been found
defaultHeadersIteration:
for (defHeaderName in defHeaders) {
@@ -17784,6 +17908,8 @@ function $HttpProvider() {
reqHeaders[defHeaderName] = defHeaders[defHeaderName];
}
+ // execute if header value is a function for merged headers
+ execHeaders(reqHeaders);
return reqHeaders;
function execHeaders(headers) {
@@ -17849,7 +17975,7 @@ function $HttpProvider() {
* Shortcut method to perform `JSONP` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request.
- * Should contain `JSON_CALLBACK` string.
+ * The name of the callback should be the string `JSON_CALLBACK`.
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
@@ -17949,14 +18075,14 @@ function $HttpProvider() {
if (cache) {
cachedResp = cache.get(url);
if (isDefined(cachedResp)) {
- if (cachedResp.then) {
+ if (isPromiseLike(cachedResp)) {
// cached request has already been sent, but there is no response yet
cachedResp.then(removePendingReq, removePendingReq);
return cachedResp;
} else {
// serving from cache
if (isArray(cachedResp)) {
- resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]), cachedResp[3]);
+ resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);
} else {
resolvePromise(cachedResp, 200, {}, 'OK');
}
@@ -17967,8 +18093,17 @@ function $HttpProvider() {
}
}
- // if we won't have the response in cache, send the request to the backend
+
+ // if we won't have the response in cache, set the xsrf headers and
+ // send the request to the backend
if (isUndefined(cachedResp)) {
+ var xsrfValue = urlIsSameOrigin(config.url)
+ ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]
+ : undefined;
+ if (xsrfValue) {
+ reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
+ }
+
$httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,
config.withCredentials, config.responseType);
}
@@ -18022,27 +18157,29 @@ function $HttpProvider() {
function buildUrl(url, params) {
- if (!params) return url;
- var parts = [];
- forEachSorted(params, function(value, key) {
- if (value === null || isUndefined(value)) return;
- if (!isArray(value)) value = [value];
+ if (!params) return url;
+ var parts = [];
+ forEachSorted(params, function(value, key) {
+ if (value === null || isUndefined(value)) return;
+ if (!isArray(value)) value = [value];
- forEach(value, function(v) {
- if (isObject(v)) {
- v = toJson(v);
- }
- parts.push(encodeUriQuery(key) + '=' +
- encodeUriQuery(v));
- });
- });
- if(parts.length > 0) {
- url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
+ forEach(value, function(v) {
+ if (isObject(v)) {
+ if (isDate(v)){
+ v = v.toISOString();
+ } else if (isObject(v)) {
+ v = toJson(v);
+ }
}
- return url;
- }
-
-
+ parts.push(encodeUriQuery(key) + '=' +
+ encodeUriQuery(v));
+ });
+ });
+ if(parts.length > 0) {
+ url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
+ }
+ return url;
+ }
}];
}
@@ -18095,16 +18232,13 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
var callbackId = '_' + (callbacks.counter++).toString(36);
callbacks[callbackId] = function(data) {
callbacks[callbackId].data = data;
+ callbacks[callbackId].called = true;
};
var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
- function() {
- if (callbacks[callbackId].data) {
- completeRequest(callback, 200, callbacks[callbackId].data);
- } else {
- completeRequest(callback, status || -2);
- }
- callbacks[callbackId] = angular.noop;
+ callbackId, function(status, text) {
+ completeRequest(callback, status, callbacks[callbackId].data, "", text);
+ callbacks[callbackId] = noop;
});
} else {
@@ -18130,7 +18264,8 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
// Safari respectively.
if (xhr && xhr.readyState == 4) {
var responseHeaders = null,
- response = null;
+ response = null,
+ statusText = '';
if(status !== ABORTED) {
responseHeaders = xhr.getAllResponseHeaders();
@@ -18140,11 +18275,17 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
response = ('response' in xhr) ? xhr.response : xhr.responseText;
}
+ // Accessing statusText on an aborted xhr object will
+ // throw an 'c00c023f error' in IE9 and lower, don't touch it.
+ if (!(status === ABORTED && msie < 10)) {
+ statusText = xhr.statusText;
+ }
+
completeRequest(callback,
status || xhr.status,
response,
responseHeaders,
- xhr.statusText || '');
+ statusText);
}
};
@@ -18174,7 +18315,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
if (timeout > 0) {
var timeoutId = $browserDefer(timeoutRequest, timeout);
- } else if (timeout && timeout.then) {
+ } else if (isPromiseLike(timeout)) {
timeout.then(timeoutRequest);
}
@@ -18206,34 +18347,52 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
}
};
- function jsonpReq(url, done) {
+ function jsonpReq(url, callbackId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
- var script = rawDocument.createElement('script'),
- doneWrapper = function() {
- script.onreadystatechange = script.onload = script.onerror = null;
- rawDocument.body.removeChild(script);
- if (done) done();
- };
-
- script.type = 'text/javascript';
+ var script = rawDocument.createElement('script'), callback = null;
+ script.type = "text/javascript";
script.src = url;
+ script.async = true;
- if (msie && msie <= 8) {
- script.onreadystatechange = function() {
- if (/loaded|complete/.test(script.readyState)) {
- doneWrapper();
+ callback = function(event) {
+ removeEventListenerFn(script, "load", callback);
+ removeEventListenerFn(script, "error", callback);
+ rawDocument.body.removeChild(script);
+ script = null;
+ var status = -1;
+ var text = "unknown";
+
+ if (event) {
+ if (event.type === "load" && !callbacks[callbackId].called) {
+ event = { type: "error" };
+ }
+ text = event.type;
+ status = event.type === "error" ? 404 : 200;
+ }
+
+ if (done) {
+ done(status, text);
+ }
+ };
+
+ addEventListenerFn(script, "load", callback);
+ addEventListenerFn(script, "error", callback);
+
+ if (msie <= 8) {
+ script.onreadystatechange = function() {
+ if (isString(script.readyState) && /loaded|complete/.test(script.readyState)) {
+ script.onreadystatechange = null;
+ callback({
+ type: 'load'
+ });
}
- };
- } else {
- script.onload = script.onerror = function() {
- doneWrapper();
};
}
rawDocument.body.appendChild(script);
- return doneWrapper;
+ return callback;
}
}
@@ -18242,7 +18401,7 @@ var $interpolateMinErr = minErr('$interpolate');
/**
* @ngdoc provider
* @name $interpolateProvider
- * @function
+ * @kind function
*
* @description
*
@@ -18260,7 +18419,7 @@ var $interpolateMinErr = minErr('$interpolate');
});
- customInterpolationApp.controller('DemoController', function DemoController() {
+ customInterpolationApp.controller('DemoController', function() {
this.label = "This binding is brought you by // interpolation symbols.";
});
@@ -18323,7 +18482,7 @@ function $InterpolateProvider() {
/**
* @ngdoc service
* @name $interpolate
- * @function
+ * @kind function
*
* @requires $parse
* @requires $sce
@@ -18415,10 +18574,24 @@ function $InterpolateProvider() {
} else {
part = $sce.valueOf(part);
}
- if (part === null || isUndefined(part)) {
+ if (part == null) { // null || undefined
part = '';
- } else if (typeof part != 'string') {
- part = toJson(part);
+ } else {
+ switch (typeof part) {
+ case 'string':
+ {
+ break;
+ }
+ case 'number':
+ {
+ part = '' + part;
+ break;
+ }
+ default:
+ {
+ part = toJson(part);
+ }
+ }
}
}
concat[i] = part;
@@ -18514,25 +18687,27 @@ function $IntervalProvider() {
* @returns {promise} A promise which will be notified on each iteration.
*
* @example
- *
- *
- *
+ * }]);
+ *
*
- *
- *
- * Date format:
- * Current time is:
- *
- * Blood 1 : {{blood_1}}
- * Blood 2 : {{blood_2}}
- *
- *
- *
- *
+ *
+ *
+ * Date format:
+ * Current time is:
+ *
+ * Blood 1 : {{blood_1}}
+ * Blood 2 : {{blood_2}}
+ *
+ *
+ *
*
+ *
*
- *
+ *
*
*/
function interval(fn, delay, count, invokeApply) {
@@ -18646,7 +18820,7 @@ function $IntervalProvider() {
interval.cancel = function(promise) {
if (promise && promise.$$intervalId in intervals) {
intervals[promise.$$intervalId].reject('canceled');
- clearInterval(promise.$$intervalId);
+ $window.clearInterval(promise.$$intervalId);
delete intervals[promise.$$intervalId];
return true;
}
@@ -18929,7 +19103,7 @@ function LocationHashbangUrl(appBase, hashPrefix) {
Matches paths for file protocol on windows,
such as /C:/foo/bar, and captures only /foo/bar.
*/
- var windowsFilePathExp = /^\/?.*?:(\/.*)/;
+ var windowsFilePathExp = /^\/[A-Z]:(\/.*)/;
var firstPathSegmentMatch;
@@ -18938,10 +19112,7 @@ function LocationHashbangUrl(appBase, hashPrefix) {
url = url.replace(base, '');
}
- /*
- * The input URL intentionally contains a
- * first path segment that ends with a colon.
- */
+ // The input URL intentionally contains a first path segment that ends with a colon.
if (windowsFilePathExp.exec(url)) {
return path;
}
@@ -18997,6 +19168,16 @@ function LocationHashbangInHtml5Url(appBase, hashPrefix) {
return appBaseNoFile;
}
};
+
+ this.$$compose = function() {
+ var search = toKeyValue(this.$$search),
+ hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
+
+ this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
+ // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'
+ this.$$absUrl = appBase + hashPrefix + this.$$url;
+ };
+
}
@@ -19128,15 +19309,40 @@ LocationHashbangInHtml5Url.prototype =
*
* Change search part when called with parameter and return `$location`.
*
+ *
+ * ```js
+ * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+ * var searchObject = $location.search();
+ * // => {foo: 'bar', baz: 'xoxo'}
+ *
+ *
+ * // set foo to 'yipee'
+ * $location.search('foo', 'yipee');
+ * // => $location
+ * ```
+ *
* @param {string|Object.|Object.>} search New search params - string or
- * hash object. Hash object may contain an array of values, which will be decoded as duplicates in
- * the url.
+ * hash object.
*
- * @param {(string|Array)=} paramValue If `search` is a string, then `paramValue` will override only a
- * single search parameter. If `paramValue` is an array, it will set the parameter as a
- * comma-separated value. If `paramValue` is `null`, the parameter will be deleted.
+ * When called with a single argument the method acts as a setter, setting the `search` component
+ * of `$location` to the specified value.
*
- * @return {string} search
+ * If the argument is a hash object containing an array of values, these values will be encoded
+ * as duplicate search parameters in the url.
+ *
+ * @param {(string|Array|boolean)=} paramValue If `search` is a string, then `paramValue`
+ * will override only a single search property.
+ *
+ * If `paramValue` is an array, it will override the property of the `search` component of
+ * `$location` specified via the first argument.
+ *
+ * If `paramValue` is `null`, the property specified via the first argument will be deleted.
+ *
+ * If `paramValue` is `true`, the property specified via the first argument will be added with no
+ * value nor trailing equal sign.
+ *
+ * @return {Object} If called with no arguments returns the parsed `search` object. If called with
+ * one or more arguments returns `$location` object itself.
*/
search: function(search, paramValue) {
switch (arguments.length) {
@@ -19146,6 +19352,11 @@ LocationHashbangInHtml5Url.prototype =
if (isString(search)) {
this.$$search = parseKeyValue(search);
} else if (isObject(search)) {
+ // remove object undefined or null properties
+ forEach(search, function(value, key) {
+ if (value == null) delete search[key];
+ });
+
this.$$search = search;
} else {
throw $locationMinErr('isrcharg',
@@ -19251,7 +19462,7 @@ function $LocationProvider(){
html5Mode = false;
/**
- * @ngdoc property
+ * @ngdoc method
* @name $locationProvider#hashPrefix
* @description
* @param {string=} prefix Prefix for hash part (containing path and search)
@@ -19267,7 +19478,7 @@ function $LocationProvider(){
};
/**
- * @ngdoc property
+ * @ngdoc method
* @name $locationProvider#html5Mode
* @description
* @param {boolean=} mode Use HTML5 strategy if available.
@@ -19349,6 +19560,39 @@ function $LocationProvider(){
absHref = urlResolve(absHref.animVal).href;
}
+ // Make relative links work in HTML5 mode for legacy browsers (or at least IE8 & 9)
+ // The href should be a regular url e.g. /link/somewhere or link/somewhere or ../somewhere or
+ // somewhere#anchor or http://example.com/somewhere
+ if (LocationMode === LocationHashbangInHtml5Url) {
+ // get the actual href attribute - see
+ // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
+ var href = elm.attr('href') || elm.attr('xlink:href');
+
+ if (href.indexOf('://') < 0) { // Ignore absolute URLs
+ var prefix = '#' + hashPrefix;
+ if (href[0] == '/') {
+ // absolute path - replace old path
+ absHref = appBase + prefix + href;
+ } else if (href[0] == '#') {
+ // local anchor
+ absHref = appBase + prefix + ($location.path() || '/') + href;
+ } else {
+ // relative path - join with current path
+ var stack = $location.path().split("/"),
+ parts = href.split("/");
+ for (var i=0; i
+
- function LogCtrl($scope, $log) {
- $scope.$log = $log;
- $scope.message = 'Hello World!';
- }
+ angular.module('logExample', [])
+ .controller('LogController', ['$scope', '$log', function($scope, $log) {
+ $scope.$log = $log;
+ $scope.message = 'Hello World!';
+ }]);
-
+
Reload this page with open console, enter text and hit the log button...
Message:
@@ -19466,7 +19711,7 @@ function $LogProvider(){
self = this;
/**
- * @ngdoc property
+ * @ngdoc method
* @name $logProvider#debugEnabled
* @description
* @param {boolean=} flag enable or disable debug level messages
@@ -19592,14 +19837,7 @@ var promiseWarning;
//
// As an example, consider the following Angular expression:
//
-// {}.toString.constructor(alert("evil JS code"))
-//
-// We want to prevent this type of access. For the sake of performance, during the lexing phase we
-// disallow any "dotted" access to any member named "constructor".
-//
-// For reflective calls (a[b]) we check that the value of the lookup is not the Function constructor
-// while evaluating the expression, which is a stronger but more expensive test. Since reflective
-// calls are expensive anyway, this is not such a big deal compared to static dereferencing.
+// {}.toString.constructor('alert("evil JS code")')
//
// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits
// against the expression language, but not to prevent exploits that were enabled by exposing
@@ -19607,17 +19845,19 @@ var promiseWarning;
// practice and therefore we are not even trying to protect against interaction with an object
// explicitly exposed in this way.
//
-// A developer could foil the name check by aliasing the Function constructor under a different
-// name on the scope.
-//
// In general, it is not possible to access a Window object from an angular expression unless a
// window or some DOM object that has a reference to window is published onto a Scope.
+// Similarly we prevent invocations of function known to be dangerous, as well as assignments to
+// native objects.
+
function ensureSafeMemberName(name, fullExpression) {
- if (name === "constructor") {
+ if (name === "__defineGetter__" || name === "__defineSetter__"
+ || name === "__lookupGetter__" || name === "__lookupSetter__"
+ || name === "__proto__") {
throw $parseMinErr('isecfld',
- 'Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
+ 'Attempting to access a disallowed field in Angular expressions! '
+ +'Expression: {0}', fullExpression);
}
return name;
}
@@ -19639,11 +19879,34 @@ function ensureSafeObject(obj, fullExpression) {
throw $parseMinErr('isecdom',
'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',
fullExpression);
+ } else if (// block Object so that we can't get hold of dangerous Object.* methods
+ obj === Object) {
+ throw $parseMinErr('isecobj',
+ 'Referencing Object in Angular expressions is disallowed! Expression: {0}',
+ fullExpression);
}
}
return obj;
}
+var CALL = Function.prototype.call;
+var APPLY = Function.prototype.apply;
+var BIND = Function.prototype.bind;
+
+function ensureSafeFunction(obj, fullExpression) {
+ if (obj) {
+ if (obj.constructor === obj) {
+ throw $parseMinErr('isecfn',
+ 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
+ fullExpression);
+ } else if (obj === CALL || obj === APPLY || (BIND && obj === BIND)) {
+ throw $parseMinErr('isecff',
+ 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',
+ fullExpression);
+ }
+ }
+}
+
var OPERATORS = {
/* jshint bitwise : false */
'null':function(){return null;},
@@ -19709,9 +19972,6 @@ Lexer.prototype = {
this.tokens = [];
- var token;
- var json = [];
-
while (this.index < this.text.length) {
this.ch = this.text.charAt(this.index);
if (this.is('"\'')) {
@@ -19720,19 +19980,11 @@ Lexer.prototype = {
this.readNumber();
} else if (this.isIdent(this.ch)) {
this.readIdent();
- // identifiers can only be if the preceding char was a { or ,
- if (this.was('{,') && json[0] === '{' &&
- (token = this.tokens[this.tokens.length - 1])) {
- token.json = token.text.indexOf('.') === -1;
- }
} else if (this.is('(){}[].,;:?')) {
this.tokens.push({
index: this.index,
- text: this.ch,
- json: (this.was(':[,') && this.is('{[')) || this.is('}]:,')
+ text: this.ch
});
- if (this.is('{[')) json.unshift(this.ch);
- if (this.is('}]')) json.shift();
this.index++;
} else if (this.isWhitespace(this.ch)) {
this.index++;
@@ -19753,8 +20005,7 @@ Lexer.prototype = {
this.tokens.push({
index: this.index,
text: this.ch,
- fn: fn,
- json: (this.was('[,:') && this.is('+-'))
+ fn: fn
});
this.index += 1;
} else {
@@ -19837,7 +20088,8 @@ Lexer.prototype = {
this.tokens.push({
index: start,
text: number,
- json: true,
+ literal: true,
+ constant: true,
fn: function() { return number; }
});
},
@@ -19889,7 +20141,8 @@ Lexer.prototype = {
// OPERATORS is our own object so we don't need to use special hasOwnPropertyFn
if (OPERATORS.hasOwnProperty(ident)) {
token.fn = OPERATORS[ident];
- token.json = OPERATORS[ident];
+ token.literal = true;
+ token.constant = true;
} else {
var getter = getterFn(ident, this.options, this.text);
token.fn = extend(function(self, locals) {
@@ -19906,13 +20159,11 @@ Lexer.prototype = {
if (methodName) {
this.tokens.push({
index:lastDot,
- text: '.',
- json: false
+ text: '.'
});
this.tokens.push({
index: lastDot + 1,
- text: methodName,
- json: false
+ text: methodName
});
}
},
@@ -19935,11 +20186,7 @@ Lexer.prototype = {
string += String.fromCharCode(parseInt(hex, 16));
} else {
var rep = ESCAPE[ch];
- if (rep) {
- string += rep;
- } else {
- string += ch;
- }
+ string = string + (rep || ch);
}
escape = false;
} else if (ch === '\\') {
@@ -19950,7 +20197,8 @@ Lexer.prototype = {
index: start,
text: rawString,
string: string,
- json: true,
+ literal: true,
+ constant: true,
fn: function() { return string; }
});
return;
@@ -19982,28 +20230,12 @@ Parser.ZERO = extend(function () {
Parser.prototype = {
constructor: Parser,
- parse: function (text, json) {
+ parse: function (text) {
this.text = text;
- //TODO(i): strip all the obsolte json stuff from this file
- this.json = json;
-
this.tokens = this.lexer.lex(text);
- if (json) {
- // The extra level of aliasing is here, just in case the lexer misses something, so that
- // we prevent any accidental execution in JSON.
- this.assignment = this.logicalOR;
-
- this.functionCall =
- this.fieldAccess =
- this.objectIndex =
- this.filterChain = function() {
- this.throwError('is not valid json', {text: text, index: 0});
- };
- }
-
- var value = json ? this.primary() : this.statements();
+ var value = this.statements();
if (this.tokens.length !== 0) {
this.throwError('is an unexpected token', this.tokens[0]);
@@ -20030,10 +20262,8 @@ Parser.prototype = {
if (!primary) {
this.throwError('not a primary expression', token);
}
- if (token.json) {
- primary.constant = true;
- primary.literal = true;
- }
+ primary.literal = !!token.literal;
+ primary.constant = !!token.constant;
}
var next, context;
@@ -20081,9 +20311,6 @@ Parser.prototype = {
expect: function(e1, e2, e3, e4){
var token = this.peek(e1, e2, e3, e4);
if (token) {
- if (this.json && !token.json) {
- this.throwError('is not valid json', token);
- }
this.tokens.shift();
return token;
}
@@ -20310,6 +20537,7 @@ Parser.prototype = {
i = indexFn(self, locals),
v, p;
+ ensureSafeMemberName(i, parser.text);
if (!o) return undefined;
v = ensureSafeObject(o[i], parser.text);
if (v && v.then && parser.options.unwrapPromises) {
@@ -20352,7 +20580,7 @@ Parser.prototype = {
var fnPtr = fn(scope, locals, context) || noop;
ensureSafeObject(context, parser.text);
- ensureSafeObject(fnPtr, parser.text);
+ ensureSafeFunction(fnPtr, parser.text);
// IE stupidity! (IE doesn't have apply for some native functions)
var v = fnPtr.apply
@@ -20461,6 +20689,8 @@ function setter(obj, path, setValue, fullExp, options) {
}
}
key = ensureSafeMemberName(element.shift(), fullExp);
+ ensureSafeObject(obj, fullExp);
+ ensureSafeObject(obj[key], fullExp);
obj[key] = setValue;
return setValue;
}
@@ -20576,26 +20806,6 @@ function cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, options) {
};
}
-function simpleGetterFn1(key0, fullExp) {
- ensureSafeMemberName(key0, fullExp);
-
- return function simpleGetterFn1(scope, locals) {
- if (scope == null) return undefined;
- return ((locals && locals.hasOwnProperty(key0)) ? locals : scope)[key0];
- };
-}
-
-function simpleGetterFn2(key0, key1, fullExp) {
- ensureSafeMemberName(key0, fullExp);
- ensureSafeMemberName(key1, fullExp);
-
- return function simpleGetterFn2(scope, locals) {
- if (scope == null) return undefined;
- scope = ((locals && locals.hasOwnProperty(key0)) ? locals : scope)[key0];
- return scope == null ? undefined : scope[key1];
- };
-}
-
function getterFn(path, options, fullExp) {
// Check whether the cache has this getter already.
// We can use hasOwnProperty directly on the cache because we ensure,
@@ -20608,13 +20818,8 @@ function getterFn(path, options, fullExp) {
pathKeysLength = pathKeys.length,
fn;
- // When we have only 1 or 2 tokens, use optimized special case closures.
// http://jsperf.com/angularjs-parse-getter/6
- if (!options.unwrapPromises && pathKeysLength === 1) {
- fn = simpleGetterFn1(pathKeys[0], fullExp);
- } else if (!options.unwrapPromises && pathKeysLength === 2) {
- fn = simpleGetterFn2(pathKeys[0], pathKeys[1], fullExp);
- } else if (options.csp) {
+ if (options.csp) {
if (pathKeysLength < 6) {
fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp,
options);
@@ -20718,7 +20923,7 @@ function getterFn(path, options, fullExp) {
/**
* @ngdoc provider
* @name $parseProvider
- * @function
+ * @kind function
*
* @description
* `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}
@@ -20837,7 +21042,7 @@ function $ParseProvider() {
var lexer = new Lexer($parseOptions);
var parser = new Parser(lexer, $filter, $parseOptions);
- parsedExpression = parser.parse(exp, false);
+ parsedExpression = parser.parse(exp);
if (exp !== 'hasOwnProperty') {
// Only cache the value if it's not going to mess up the cache object
@@ -20880,17 +21085,13 @@ function $ParseProvider() {
* var deferred = $q.defer();
*
* setTimeout(function() {
- * // since this fn executes async in a future turn of the event loop, we need to wrap
- * // our code into an $apply call so that the model changes are properly observed.
- * scope.$apply(function() {
- * deferred.notify('About to greet ' + name + '.');
+ * deferred.notify('About to greet ' + name + '.');
*
- * if (okToGreet(name)) {
- * deferred.resolve('Hello, ' + name + '!');
- * } else {
- * deferred.reject('Greeting ' + name + ' is not allowed.');
- * }
- * });
+ * if (okToGreet(name)) {
+ * deferred.resolve('Hello, ' + name + '!');
+ * } else {
+ * deferred.reject('Greeting ' + name + ' is not allowed.');
+ * }
* }, 1000);
*
* return deferred.promise;
@@ -21048,7 +21249,7 @@ function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc method
* @name $q#defer
- * @function
+ * @kind function
*
* @description
* Creates a `Deferred` object which represents a task which will finish in the future.
@@ -21164,7 +21365,7 @@ function qFactory(nextTick, exceptionHandler) {
} catch(e) {
return makePromise(e, false);
}
- if (callbackOutput && isFunction(callbackOutput.then)) {
+ if (isPromiseLike(callbackOutput)) {
return callbackOutput.then(function() {
return makePromise(value, isResolved);
}, function(error) {
@@ -21189,7 +21390,7 @@ function qFactory(nextTick, exceptionHandler) {
var ref = function(value) {
- if (value && isFunction(value.then)) return value;
+ if (isPromiseLike(value)) return value;
return {
then: function(callback) {
var result = defer();
@@ -21205,7 +21406,7 @@ function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc method
* @name $q#reject
- * @function
+ * @kind function
*
* @description
* Creates a promise that is resolved as rejected with the specified `reason`. This api should be
@@ -21265,7 +21466,7 @@ function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc method
* @name $q#when
- * @function
+ * @kind function
*
* @description
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
@@ -21337,7 +21538,7 @@ function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc method
* @name $q#all
- * @function
+ * @kind function
*
* @description
* Combines multiple promises into a single promise that is resolved when all of the input
@@ -21428,7 +21629,7 @@ function $$RAFProvider(){ //rAF
*
* Loop operations are optimized by using while(count--) { ... }
* - this means that in order to keep the same order of execution as addition we have to add
- * items to the array at the beginning (shift) instead of at the end (push)
+ * items to the array at the beginning (unshift) instead of at the end (push)
*
* Child scopes are created and removed often
* - Using an array would be slow since inserts in middle are expensive so we use linked list
@@ -21562,7 +21763,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$new
- * @function
+ * @kind function
*
* @description
* Creates a new child {@link ng.$rootScope.Scope scope}.
@@ -21594,18 +21795,23 @@ function $RootScopeProvider(){
child.$$asyncQueue = this.$$asyncQueue;
child.$$postDigestQueue = this.$$postDigestQueue;
} else {
- ChildScope = function() {}; // should be anonymous; This is so that when the minifier munges
- // the name it does not become random set of chars. This will then show up as class
- // name in the web inspector.
- ChildScope.prototype = this;
- child = new ChildScope();
- child.$id = nextUid();
+ // Only create a child scope class if somebody asks for one,
+ // but cache it to allow the VM to optimize lookups.
+ if (!this.$$childScopeClass) {
+ this.$$childScopeClass = function() {
+ this.$$watchers = this.$$nextSibling =
+ this.$$childHead = this.$$childTail = null;
+ this.$$listeners = {};
+ this.$$listenerCount = {};
+ this.$id = nextUid();
+ this.$$childScopeClass = null;
+ };
+ this.$$childScopeClass.prototype = this;
+ }
+ child = new this.$$childScopeClass();
}
child['this'] = child;
- child.$$listeners = {};
- child.$$listenerCount = {};
child.$parent = this;
- child.$$watchers = child.$$nextSibling = child.$$childHead = child.$$childTail = null;
child.$$prevSibling = this.$$childTail;
if (this.$$childHead) {
this.$$childTail.$$nextSibling = child;
@@ -21619,7 +21825,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$watch
- * @function
+ * @kind function
*
* @description
* Registers a `listener` callback to be executed whenever the `watchExpression` changes.
@@ -21631,10 +21837,14 @@ function $RootScopeProvider(){
* {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
* - The `listener` is called only when the value from the current `watchExpression` and the
* previous call to `watchExpression` are not equal (with the exception of the initial run,
- * see below). The inequality is determined according to
- * {@link angular.equals} function. To save the value of the object for later comparison,
- * the {@link angular.copy} function is used. It also means that watching complex options
- * will have adverse memory and performance implications.
+ * see below). Inequality is determined according to reference inequality,
+ * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
+ * via the `!==` Javascript operator, unless `objectEquality == true`
+ * (see next point)
+ * - When `objectEquality == true`, inequality of the `watchExpression` is determined
+ * according to the {@link angular.equals} function. To save the value of the object for
+ * later comparison, the {@link angular.copy} function is used. This therefore means that
+ * watching complex objects will have adverse memory and performance implications.
* - The watch `listener` may change the model, which may trigger other `listener`s to fire.
* This is achieved by rerunning the watchers until no changes are detected. The rerun
* iteration limit is 10 to prevent an infinite loop deadlock.
@@ -21669,12 +21879,16 @@ function $RootScopeProvider(){
expect(scope.counter).toEqual(0);
scope.$digest();
- // no variable change
- expect(scope.counter).toEqual(0);
+ // the listener is always called during the first $digest loop after it was registered
+ expect(scope.counter).toEqual(1);
+
+ scope.$digest();
+ // but now it will not be called unless the value changes
+ expect(scope.counter).toEqual(1);
scope.name = 'adam';
scope.$digest();
- expect(scope.counter).toEqual(1);
+ expect(scope.counter).toEqual(2);
@@ -21761,7 +21975,7 @@ function $RootScopeProvider(){
// the while loop reads in reverse order.
array.unshift(watcher);
- return function() {
+ return function deregisterWatch() {
arrayRemove(array, watcher);
lastDirtyWatch = null;
};
@@ -21771,7 +21985,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$watchCollection
- * @function
+ * @kind function
*
* @description
* Shallow watches the properties of an object and fires whenever any of the properties change
@@ -21843,7 +22057,7 @@ function $RootScopeProvider(){
function $watchCollectionWatch() {
newValue = objGetter(self);
- var newLength, key;
+ var newLength, key, bothNaN;
if (!isObject(newValue)) { // if primitive
if (oldValue !== newValue) {
@@ -21867,7 +22081,7 @@ function $RootScopeProvider(){
}
// copy the items to oldValue and look for changes.
for (var i = 0; i < newLength; i++) {
- var bothNaN = (oldValue[i] !== oldValue[i]) &&
+ bothNaN = (oldValue[i] !== oldValue[i]) &&
(newValue[i] !== newValue[i]);
if (!bothNaN && (oldValue[i] !== newValue[i])) {
changeDetected++;
@@ -21887,7 +22101,9 @@ function $RootScopeProvider(){
if (newValue.hasOwnProperty(key)) {
newLength++;
if (oldValue.hasOwnProperty(key)) {
- if (oldValue[key] !== newValue[key]) {
+ bothNaN = (oldValue[key] !== oldValue[key]) &&
+ (newValue[key] !== newValue[key]);
+ if (!bothNaN && (oldValue[key] !== newValue[key])) {
changeDetected++;
oldValue[key] = newValue[key];
}
@@ -21947,7 +22163,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$digest
- * @function
+ * @kind function
*
* @description
* Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and
@@ -21982,12 +22198,16 @@ function $RootScopeProvider(){
expect(scope.counter).toEqual(0);
scope.$digest();
- // no variable change
- expect(scope.counter).toEqual(0);
+ // the listener is always called during the first $digest loop after it was registered
+ expect(scope.counter).toEqual(1);
+
+ scope.$digest();
+ // but now it will not be called unless the value changes
+ expect(scope.counter).toEqual(1);
scope.name = 'adam';
scope.$digest();
- expect(scope.counter).toEqual(1);
+ expect(scope.counter).toEqual(2);
* ```
*
*/
@@ -22035,11 +22255,11 @@ function $RootScopeProvider(){
if ((value = watch.get(current)) !== (last = watch.last) &&
!(watch.eq
? equals(value, last)
- : (typeof value == 'number' && typeof last == 'number'
+ : (typeof value === 'number' && typeof last === 'number'
&& isNaN(value) && isNaN(last)))) {
dirty = true;
lastDirtyWatch = watch;
- watch.last = watch.eq ? copy(value) : value;
+ watch.last = watch.eq ? copy(value, null) : value;
watch.fn(value, ((last === initWatchVal) ? value : last), current);
if (ttl < 5) {
logIdx = 4 - ttl;
@@ -22114,7 +22334,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$destroy
- * @function
+ * @kind function
*
* @description
* Removes the current scope (and all of its children) from the parent scope. Removal implies
@@ -22175,7 +22395,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$eval
- * @function
+ * @kind function
*
* @description
* Executes the `expression` on the current scope and returns the result. Any exceptions in
@@ -22207,7 +22427,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$evalAsync
- * @function
+ * @kind function
*
* @description
* Executes the expression on the current scope at a later point in time.
@@ -22254,7 +22474,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$apply
- * @function
+ * @kind function
*
* @description
* `$apply()` is used to execute an expression in angular from outside of the angular
@@ -22316,7 +22536,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$on
- * @function
+ * @kind function
*
* @description
* Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
@@ -22365,7 +22585,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$emit
- * @function
+ * @kind function
*
* @description
* Dispatches an event `name` upwards through the scope hierarchy notifying the
@@ -22433,7 +22653,7 @@ function $RootScopeProvider(){
/**
* @ngdoc method
* @name $rootScope.Scope#$broadcast
- * @function
+ * @kind function
*
* @description
* Dispatches an event `name` downwards to all child scopes (and their children) notifying the
@@ -22681,7 +22901,7 @@ function adjustMatchers(matchers) {
/**
* @ngdoc service
* @name $sceDelegate
- * @function
+ * @kind function
*
* @description
*
@@ -22728,19 +22948,21 @@ function adjustMatchers(matchers) {
*
* Here is what a secure configuration for this scenario might look like:
*
- *
- * angular.module('myApp', []).config(function($sceDelegateProvider) {
- * $sceDelegateProvider.resourceUrlWhitelist([
- * // Allow same origin resource loads.
- * 'self',
- * // Allow loading from our assets domain. Notice the difference between * and **.
- * 'http://srv*.assets.example.com/**']);
+ * ```
+ * angular.module('myApp', []).config(function($sceDelegateProvider) {
+ * $sceDelegateProvider.resourceUrlWhitelist([
+ * // Allow same origin resource loads.
+ * 'self',
+ * // Allow loading from our assets domain. Notice the difference between * and **.
+ * 'http://srv*.assets.example.com/**'
+ * ]);
*
- * // The blacklist overrides the whitelist so the open redirect here is blocked.
- * $sceDelegateProvider.resourceUrlBlacklist([
- * 'http://myapp.example.com/clickThru**']);
- * });
- *
+ * // The blacklist overrides the whitelist so the open redirect here is blocked.
+ * $sceDelegateProvider.resourceUrlBlacklist([
+ * 'http://myapp.example.com/clickThru**'
+ * ]);
+ * });
+ * ```
*/
function $SceDelegateProvider() {
@@ -22753,7 +22975,7 @@ function $SceDelegateProvider() {
/**
* @ngdoc method
* @name $sceDelegateProvider#resourceUrlWhitelist
- * @function
+ * @kind function
*
* @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value
* provided. This must be an array or null. A snapshot of this array is used so further
@@ -22782,7 +23004,7 @@ function $SceDelegateProvider() {
/**
* @ngdoc method
* @name $sceDelegateProvider#resourceUrlBlacklist
- * @function
+ * @kind function
*
* @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value
* provided. This must be an array or null. A snapshot of this array is used so further
@@ -23009,7 +23231,7 @@ function $SceDelegateProvider() {
/**
* @ngdoc service
* @name $sce
- * @function
+ * @kind function
*
* @description
*
@@ -23035,10 +23257,10 @@ function $SceDelegateProvider() {
*
* Here's an example of a binding in a privileged context:
*
- *
- *
- *
- *
+ * ```
+ *
+ *
+ * ```
*
* Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE
* disabled, this application allows the user to render arbitrary HTML into the DIV.
@@ -23078,15 +23300,15 @@ function $SceDelegateProvider() {
* ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly
* simplified):
*
- *
[ unsorted ]
@@ -24993,6 +25253,51 @@ function limitToFilter(){
+ *
+ * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the
+ * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the
+ * desired parameters.
+ *
+ * Example:
+ *
+ * @example
+
+
+