angularjs-rails 1.2.15 → 1.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -68,7 +68,7 @@ function minErr(module) {
68
68
  return match;
69
69
  });
70
70
 
71
- message = message + '\nhttp://errors.angularjs.org/1.3.0-beta.3/' +
71
+ message = message + '\nhttp://errors.angularjs.org/1.3.0-beta.5/' +
72
72
  (module ? module + '/' : '') + code;
73
73
  for (i = 2; i < arguments.length; i++) {
74
74
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -1355,7 +1355,7 @@ function angularInit(element, bootstrap) {
1355
1355
  * </file>
1356
1356
  * </example>
1357
1357
  *
1358
- * @param {Element} element DOM element which is the root of angular application.
1358
+ * @param {DOMElement} element DOM element which is the root of angular application.
1359
1359
  * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
1360
1360
  * Each item in the array should be the name of a predefined module or a (DI annotated)
1361
1361
  * function that will be invoked by the injector as a run block.
@@ -1589,9 +1589,9 @@ function setupModuleLoader(window) {
1589
1589
  * {@link angular.bootstrap} to simplify this process for you.
1590
1590
  *
1591
1591
  * @param {!string} name The name of the module to create or retrieve.
1592
- * @param {Array.<string>=} requires If specified then new module is being created. If
1592
+ * @param {!Array.<string>=} requires If specified then new module is being created. If
1593
1593
  * unspecified then the module is being retrieved for further configuration.
1594
- * @param {Function} configFn Optional configuration function for the module. Same as
1594
+ * @param {Function=} configFn Optional configuration function for the module. Same as
1595
1595
  * {@link angular.Module#config Module#config()}.
1596
1596
  * @returns {module} new module with the {@link angular.Module} api.
1597
1597
  */
@@ -1919,11 +1919,11 @@ function setupModuleLoader(window) {
1919
1919
  * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
1920
1920
  */
1921
1921
  var version = {
1922
- full: '1.3.0-beta.3', // all of these placeholder strings will be replaced by grunt's
1922
+ full: '1.3.0-beta.5', // all of these placeholder strings will be replaced by grunt's
1923
1923
  major: 1, // package task
1924
1924
  minor: 3,
1925
1925
  dot: 0,
1926
- codeName: 'emotional-waffles'
1926
+ codeName: 'chimeric-glitterfication'
1927
1927
  };
1928
1928
 
1929
1929
 
@@ -2226,6 +2226,81 @@ function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArgu
2226
2226
  }
2227
2227
  }
2228
2228
 
2229
+ var SINGLE_TAG_REGEXP = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
2230
+ var HTML_REGEXP = /<|&#?\w+;/;
2231
+ var TAG_NAME_REGEXP = /<([\w:]+)/;
2232
+ var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
2233
+
2234
+ var wrapMap = {
2235
+ 'option': [1, '<select multiple="multiple">', '</select>'],
2236
+
2237
+ 'thead': [1, '<table>', '</table>'],
2238
+ 'col': [2, '<table><colgroup>', '</colgroup></table>'],
2239
+ 'tr': [2, '<table><tbody>', '</tbody></table>'],
2240
+ 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
2241
+ '_default': [0, "", ""]
2242
+ };
2243
+
2244
+ wrapMap.optgroup = wrapMap.option;
2245
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
2246
+ wrapMap.th = wrapMap.td;
2247
+
2248
+ function jqLiteIsTextNode(html) {
2249
+ return !HTML_REGEXP.test(html);
2250
+ }
2251
+
2252
+ function jqLiteBuildFragment(html, context) {
2253
+ var elem, tmp, tag, wrap,
2254
+ fragment = context.createDocumentFragment(),
2255
+ nodes = [], i;
2256
+
2257
+ if (jqLiteIsTextNode(html)) {
2258
+ // Convert non-html into a text node
2259
+ nodes.push(context.createTextNode(html));
2260
+ } else {
2261
+ // Convert html into DOM nodes
2262
+ tmp = tmp || fragment.appendChild(context.createElement("div"));
2263
+ tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
2264
+ wrap = wrapMap[tag] || wrapMap._default;
2265
+ tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
2266
+
2267
+ // Descend through wrappers to the right content
2268
+ i = wrap[0];
2269
+ while (i--) {
2270
+ tmp = tmp.lastChild;
2271
+ }
2272
+
2273
+ nodes = concat(nodes, tmp.childNodes);
2274
+
2275
+ tmp = fragment.firstChild;
2276
+ tmp.textContent = "";
2277
+ }
2278
+
2279
+ // Remove wrapper from fragment
2280
+ fragment.textContent = "";
2281
+ fragment.innerHTML = ""; // Clear inner HTML
2282
+ forEach(nodes, function(node) {
2283
+ fragment.appendChild(node);
2284
+ });
2285
+
2286
+ return fragment;
2287
+ }
2288
+
2289
+ function jqLiteParseHTML(html, context) {
2290
+ context = context || document;
2291
+ var parsed;
2292
+
2293
+ if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
2294
+ return [context.createElement(parsed[1])];
2295
+ }
2296
+
2297
+ if ((parsed = jqLiteBuildFragment(html, context))) {
2298
+ return parsed.childNodes;
2299
+ }
2300
+
2301
+ return [];
2302
+ }
2303
+
2229
2304
  /////////////////////////////////////////////
2230
2305
  function JQLite(element) {
2231
2306
  if (element instanceof JQLite) {
@@ -2242,14 +2317,7 @@ function JQLite(element) {
2242
2317
  }
2243
2318
 
2244
2319
  if (isString(element)) {
2245
- var div = document.createElement('div');
2246
- // Read about the NoScope elements here:
2247
- // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
2248
- div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!
2249
- div.removeChild(div.firstChild); // remove the superfluous div
2250
- jqLiteAddNodes(this, div.childNodes);
2251
- var fragment = jqLite(document.createDocumentFragment());
2252
- fragment.append(this); // detach the elements from the temporary DOM div.
2320
+ jqLiteAddNodes(this, jqLiteParseHTML(element));
2253
2321
  } else {
2254
2322
  jqLiteAddNodes(this, element);
2255
2323
  }
@@ -4042,8 +4110,9 @@ var $AnimateProvider = ['$provide', function($provide) {
4042
4110
  * @ngdoc method
4043
4111
  * @name $animate#enter
4044
4112
  * @function
4045
- * @description Inserts the element into the DOM either after the `after` element or within
4046
- * the `parent` element. Once complete, the done() callback will be fired (if provided).
4113
+ * @description Inserts the element into the DOM either after the `after` element or
4114
+ * as the first child within the `parent` element. Once complete, the done() callback
4115
+ * will be fired (if provided).
4047
4116
  * @param {DOMElement} element the element which will be inserted into the DOM
4048
4117
  * @param {DOMElement} parent the parent element which will append the element as
4049
4118
  * a child (if the after element is not present)
@@ -4053,14 +4122,9 @@ var $AnimateProvider = ['$provide', function($provide) {
4053
4122
  * inserted into the DOM
4054
4123
  */
4055
4124
  enter : function(element, parent, after, done) {
4056
- if (after) {
4057
- after.after(element);
4058
- } else {
4059
- if (!parent || !parent[0]) {
4060
- parent = after.parent();
4061
- }
4062
- parent.append(element);
4063
- }
4125
+ after
4126
+ ? after.after(element)
4127
+ : parent.prepend(element);
4064
4128
  async(done);
4065
4129
  },
4066
4130
 
@@ -4575,7 +4639,8 @@ function $BrowserProvider(){
4575
4639
  * @name $cacheFactory
4576
4640
  *
4577
4641
  * @description
4578
- * Factory that constructs cache objects and gives access to them.
4642
+ * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
4643
+ * them.
4579
4644
  *
4580
4645
  * ```js
4581
4646
  *
@@ -4607,6 +4672,46 @@ function $BrowserProvider(){
4607
4672
  * - `{void}` `removeAll()` — Removes all cached values.
4608
4673
  * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
4609
4674
  *
4675
+ * @example
4676
+ <example module="cacheExampleApp">
4677
+ <file name="index.html">
4678
+ <div ng-controller="CacheController">
4679
+ <input ng-model="newCacheKey" placeholder="Key">
4680
+ <input ng-model="newCacheValue" placeholder="Value">
4681
+ <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
4682
+
4683
+ <p ng-if="keys.length">Cached Values</p>
4684
+ <div ng-repeat="key in keys">
4685
+ <span ng-bind="key"></span>
4686
+ <span>: </span>
4687
+ <b ng-bind="cache.get(key)"></b>
4688
+ </div>
4689
+
4690
+ <p>Cache Info</p>
4691
+ <div ng-repeat="(key, value) in cache.info()">
4692
+ <span ng-bind="key"></span>
4693
+ <span>: </span>
4694
+ <b ng-bind="value"></b>
4695
+ </div>
4696
+ </div>
4697
+ </file>
4698
+ <file name="script.js">
4699
+ angular.module('cacheExampleApp', []).
4700
+ controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
4701
+ $scope.keys = [];
4702
+ $scope.cache = $cacheFactory('cacheId');
4703
+ $scope.put = function(key, value) {
4704
+ $scope.cache.put(key, value);
4705
+ $scope.keys.push(key);
4706
+ };
4707
+ }]);
4708
+ </file>
4709
+ <file name="style.css">
4710
+ p {
4711
+ margin: 10px 0 3px;
4712
+ }
4713
+ </file>
4714
+ </example>
4610
4715
  */
4611
4716
  function $CacheFactoryProvider() {
4612
4717
 
@@ -4626,8 +4731,65 @@ function $CacheFactoryProvider() {
4626
4731
  freshEnd = null,
4627
4732
  staleEnd = null;
4628
4733
 
4734
+ /**
4735
+ * @ngdoc type
4736
+ * @name $cacheFactory.Cache
4737
+ *
4738
+ * @description
4739
+ * A cache object used to store and retrieve data, primarily used by
4740
+ * {@link $http $http} and the {@link ng.directive:script script} directive to cache
4741
+ * templates and other data.
4742
+ *
4743
+ * ```js
4744
+ * angular.module('superCache')
4745
+ * .factory('superCache', ['$cacheFactory', function($cacheFactory) {
4746
+ * return $cacheFactory('super-cache');
4747
+ * }]);
4748
+ * ```
4749
+ *
4750
+ * Example test:
4751
+ *
4752
+ * ```js
4753
+ * it('should behave like a cache', inject(function(superCache) {
4754
+ * superCache.put('key', 'value');
4755
+ * superCache.put('another key', 'another value');
4756
+ *
4757
+ * expect(superCache.info()).toEqual({
4758
+ * id: 'super-cache',
4759
+ * size: 2
4760
+ * });
4761
+ *
4762
+ * superCache.remove('another key');
4763
+ * expect(superCache.get('another key')).toBeUndefined();
4764
+ *
4765
+ * superCache.removeAll();
4766
+ * expect(superCache.info()).toEqual({
4767
+ * id: 'super-cache',
4768
+ * size: 0
4769
+ * });
4770
+ * }));
4771
+ * ```
4772
+ */
4629
4773
  return caches[cacheId] = {
4630
4774
 
4775
+ /**
4776
+ * @ngdoc method
4777
+ * @name $cacheFactory.Cache#put
4778
+ * @function
4779
+ *
4780
+ * @description
4781
+ * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
4782
+ * retrieved later, and incrementing the size of the cache if the key was not already
4783
+ * present in the cache. If behaving like an LRU cache, it will also remove stale
4784
+ * entries from the set.
4785
+ *
4786
+ * It will not insert undefined values into the cache.
4787
+ *
4788
+ * @param {string} key the key under which the cached data is stored.
4789
+ * @param {*} value the value to store alongside the key. If it is undefined, the key
4790
+ * will not be stored.
4791
+ * @returns {*} the value stored.
4792
+ */
4631
4793
  put: function(key, value) {
4632
4794
  if (capacity < Number.MAX_VALUE) {
4633
4795
  var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
@@ -4646,7 +4808,17 @@ function $CacheFactoryProvider() {
4646
4808
  return value;
4647
4809
  },
4648
4810
 
4649
-
4811
+ /**
4812
+ * @ngdoc method
4813
+ * @name $cacheFactory.Cache#get
4814
+ * @function
4815
+ *
4816
+ * @description
4817
+ * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
4818
+ *
4819
+ * @param {string} key the key of the data to be retrieved
4820
+ * @returns {*} the value stored.
4821
+ */
4650
4822
  get: function(key) {
4651
4823
  if (capacity < Number.MAX_VALUE) {
4652
4824
  var lruEntry = lruHash[key];
@@ -4660,6 +4832,16 @@ function $CacheFactoryProvider() {
4660
4832
  },
4661
4833
 
4662
4834
 
4835
+ /**
4836
+ * @ngdoc method
4837
+ * @name $cacheFactory.Cache#remove
4838
+ * @function
4839
+ *
4840
+ * @description
4841
+ * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
4842
+ *
4843
+ * @param {string} key the key of the entry to be removed
4844
+ */
4663
4845
  remove: function(key) {
4664
4846
  if (capacity < Number.MAX_VALUE) {
4665
4847
  var lruEntry = lruHash[key];
@@ -4678,6 +4860,14 @@ function $CacheFactoryProvider() {
4678
4860
  },
4679
4861
 
4680
4862
 
4863
+ /**
4864
+ * @ngdoc method
4865
+ * @name $cacheFactory.Cache#removeAll
4866
+ * @function
4867
+ *
4868
+ * @description
4869
+ * Clears the cache object of any entries.
4870
+ */
4681
4871
  removeAll: function() {
4682
4872
  data = {};
4683
4873
  size = 0;
@@ -4686,6 +4876,15 @@ function $CacheFactoryProvider() {
4686
4876
  },
4687
4877
 
4688
4878
 
4879
+ /**
4880
+ * @ngdoc method
4881
+ * @name $cacheFactory.Cache#destroy
4882
+ * @function
4883
+ *
4884
+ * @description
4885
+ * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
4886
+ * removing it from the {@link $cacheFactory $cacheFactory} set.
4887
+ */
4689
4888
  destroy: function() {
4690
4889
  data = null;
4691
4890
  stats = null;
@@ -4694,6 +4893,22 @@ function $CacheFactoryProvider() {
4694
4893
  },
4695
4894
 
4696
4895
 
4896
+ /**
4897
+ * @ngdoc method
4898
+ * @name $cacheFactory.Cache#info
4899
+ * @function
4900
+ *
4901
+ * @description
4902
+ * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
4903
+ *
4904
+ * @returns {object} an object with the following properties:
4905
+ * <ul>
4906
+ * <li>**id**: the id of the cache instance</li>
4907
+ * <li>**size**: the number of entries kept in the cache instance</li>
4908
+ * <li>**...**: any additional properties from the options object when creating the
4909
+ * cache.</li>
4910
+ * </ul>
4911
+ */
4697
4912
  info: function() {
4698
4913
  return extend({}, stats, {size: size});
4699
4914
  }
@@ -4880,6 +5095,7 @@ function $TemplateCacheProvider() {
4880
5095
  * restrict: 'A',
4881
5096
  * scope: false,
4882
5097
  * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
5098
+ * controllerAs: 'stringAlias',
4883
5099
  * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
4884
5100
  * compile: function compile(tElement, tAttrs, transclude) {
4885
5101
  * return {
@@ -5097,6 +5313,16 @@ function $TemplateCacheProvider() {
5097
5313
  * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
5098
5314
  * should be done in a linking function rather than in a compile function.
5099
5315
  * </div>
5316
+
5317
+ * <div class="alert alert-warning">
5318
+ * **Note:** The compile function cannot handle directives that recursively use themselves in their
5319
+ * own templates or compile functions. Compiling these directives results in an infinite loop and a
5320
+ * stack overflow errors.
5321
+ *
5322
+ * This can be avoided by manually using $compile in the postLink function to imperatively compile
5323
+ * a directive's template instead of relying on automatic template compilation via `template` or
5324
+ * `templateUrl` declaration or manual compilation inside the compile function.
5325
+ * </div>
5100
5326
  *
5101
5327
  * <div class="alert alert-error">
5102
5328
  * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
@@ -5318,8 +5544,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
5318
5544
  var hasDirectives = {},
5319
5545
  Suffix = 'Directive',
5320
5546
  COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
5321
- CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/,
5322
- TABLE_CONTENT_REGEXP = /^<\s*(tr|th|td|thead|tbody|tfoot)(\s+[^>]*)?>/i;
5547
+ CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/;
5323
5548
 
5324
5549
  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
5325
5550
  // The assumption is that future DOM event attribute names will begin with
@@ -6064,7 +6289,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
6064
6289
 
6065
6290
  if (directive.replace) {
6066
6291
  replaceDirective = directive;
6067
- $template = directiveTemplateContents(directiveValue);
6292
+ if (jqLiteIsTextNode(directiveValue)) {
6293
+ $template = [];
6294
+ } else {
6295
+ $template = jqLite(directiveValue);
6296
+ }
6068
6297
  compileNode = $template[0];
6069
6298
 
6070
6299
  if ($template.length != 1 || compileNode.nodeType !== 1) {
@@ -6463,27 +6692,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
6463
6692
  }
6464
6693
 
6465
6694
 
6466
- function directiveTemplateContents(template) {
6467
- var type;
6468
- template = trim(template);
6469
- if ((type = TABLE_CONTENT_REGEXP.exec(template))) {
6470
- type = type[1].toLowerCase();
6471
- var table = jqLite('<table>' + template + '</table>');
6472
- if (/(thead|tbody|tfoot)/.test(type)) {
6473
- return table.children(type);
6474
- }
6475
- table = table.children('tbody');
6476
- if (type === 'tr') {
6477
- return table.children('tr');
6478
- }
6479
- return table.children('tr').contents();
6480
- }
6481
- return jqLite('<div>' +
6482
- template +
6483
- '</div>').contents();
6484
- }
6485
-
6486
-
6487
6695
  function compileTemplateUrl(directives, $compileNode, tAttrs,
6488
6696
  $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
6489
6697
  var linkQueue = [],
@@ -6508,7 +6716,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
6508
6716
  content = denormalizeTemplate(content);
6509
6717
 
6510
6718
  if (origAsyncDirective.replace) {
6511
- $template = directiveTemplateContents(content);
6719
+ if (jqLiteIsTextNode(content)) {
6720
+ $template = [];
6721
+ } else {
6722
+ $template = jqLite(content);
6723
+ }
6512
6724
  compileNode = $template[0];
6513
6725
 
6514
6726
  if ($template.length != 1 || compileNode.nodeType !== 1) {
@@ -7286,7 +7498,7 @@ function $HttpProvider() {
7286
7498
  *
7287
7499
  * ```
7288
7500
  * module.run(function($http) {
7289
- * $http.defaults.headers.common.Authentication = 'Basic YmVlcDpib29w'
7501
+ * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
7290
7502
  * });
7291
7503
  * ```
7292
7504
  *
@@ -7580,6 +7792,7 @@ function $HttpProvider() {
7580
7792
  * - **status** – `{number}` – HTTP status code of the response.
7581
7793
  * - **headers** – `{function([headerName])}` – Header getter function.
7582
7794
  * - **config** – `{Object}` – The configuration object that was used to generate the request.
7795
+ * - **statusText** – `{string}` – HTTP status text of the response.
7583
7796
  *
7584
7797
  * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
7585
7798
  * requests. This is primarily meant to be used for debugging purposes.
@@ -7954,9 +8167,9 @@ function $HttpProvider() {
7954
8167
  } else {
7955
8168
  // serving from cache
7956
8169
  if (isArray(cachedResp)) {
7957
- resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]));
8170
+ resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]), cachedResp[3]);
7958
8171
  } else {
7959
- resolvePromise(cachedResp, 200, {});
8172
+ resolvePromise(cachedResp, 200, {}, 'OK');
7960
8173
  }
7961
8174
  }
7962
8175
  } else {
@@ -7980,17 +8193,17 @@ function $HttpProvider() {
7980
8193
  * - resolves the raw $http promise
7981
8194
  * - calls $apply
7982
8195
  */
7983
- function done(status, response, headersString) {
8196
+ function done(status, response, headersString, statusText) {
7984
8197
  if (cache) {
7985
8198
  if (isSuccess(status)) {
7986
- cache.put(url, [status, response, parseHeaders(headersString)]);
8199
+ cache.put(url, [status, response, parseHeaders(headersString), statusText]);
7987
8200
  } else {
7988
8201
  // remove promise from the cache
7989
8202
  cache.remove(url);
7990
8203
  }
7991
8204
  }
7992
8205
 
7993
- resolvePromise(response, status, headersString);
8206
+ resolvePromise(response, status, headersString, statusText);
7994
8207
  if (!$rootScope.$$phase) $rootScope.$apply();
7995
8208
  }
7996
8209
 
@@ -7998,7 +8211,7 @@ function $HttpProvider() {
7998
8211
  /**
7999
8212
  * Resolves the raw $http promise.
8000
8213
  */
8001
- function resolvePromise(response, status, headers) {
8214
+ function resolvePromise(response, status, headers, statusText) {
8002
8215
  // normalize internal statuses to 0
8003
8216
  status = Math.max(status, 0);
8004
8217
 
@@ -8006,7 +8219,8 @@ function $HttpProvider() {
8006
8219
  data: response,
8007
8220
  status: status,
8008
8221
  headers: headersGetter(headers),
8009
- config: config
8222
+ config: config,
8223
+ statusText : statusText
8010
8224
  });
8011
8225
  }
8012
8226
 
@@ -8137,7 +8351,8 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
8137
8351
  completeRequest(callback,
8138
8352
  status || xhr.status,
8139
8353
  response,
8140
- responseHeaders);
8354
+ responseHeaders,
8355
+ xhr.statusText || '');
8141
8356
  }
8142
8357
  };
8143
8358
 
@@ -8178,7 +8393,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
8178
8393
  xhr && xhr.abort();
8179
8394
  }
8180
8395
 
8181
- function completeRequest(callback, status, response, headersString) {
8396
+ function completeRequest(callback, status, response, headersString, statusText) {
8182
8397
  // cancel timeout and subsequent timeout promise resolution
8183
8398
  timeoutId && $browserDefer.cancel(timeoutId);
8184
8399
  jsonpDone = xhr = null;
@@ -8191,9 +8406,10 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
8191
8406
  }
8192
8407
 
8193
8408
  // normalize IE bug (http://bugs.jquery.com/ticket/1450)
8194
- status = status == 1223 ? 204 : status;
8409
+ status = status === 1223 ? 204 : status;
8410
+ statusText = statusText || '';
8195
8411
 
8196
- callback(status, response, headersString);
8412
+ callback(status, response, headersString, statusText);
8197
8413
  $browser.$$completeOutstandingRequest(noop);
8198
8414
  }
8199
8415
  };
@@ -9235,8 +9451,7 @@ function locationGetterSetter(property, preprocess) {
9235
9451
  * - Clicks on a link.
9236
9452
  * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
9237
9453
  *
9238
- * For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular
9239
- * Services: Using $location}
9454
+ * For more information see {@link guide/$location Developer Guide: Using $location}
9240
9455
  */
9241
9456
 
9242
9457
  /**
@@ -9972,7 +10187,11 @@ var Parser = function (lexer, $filter, options) {
9972
10187
  this.options = options;
9973
10188
  };
9974
10189
 
9975
- Parser.ZERO = function () { return 0; };
10190
+ Parser.ZERO = extend(function () {
10191
+ return 0;
10192
+ }, {
10193
+ constant: true
10194
+ });
9976
10195
 
9977
10196
  Parser.prototype = {
9978
10197
  constructor: Parser,
@@ -11717,7 +11936,8 @@ function $RootScopeProvider(){
11717
11936
  * - `function(newValue, oldValue, scope)`: called with current and previous values as
11718
11937
  * parameters.
11719
11938
  *
11720
- * @param {boolean=} objectEquality Compare object for equality rather than for reference.
11939
+ * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
11940
+ * comparing for reference equality.
11721
11941
  * @returns {function()} Returns a deregistration function for this listener.
11722
11942
  */
11723
11943
  $watch: function(watchExp, listener, objectEquality) {
@@ -12138,15 +12358,32 @@ function $RootScopeProvider(){
12138
12358
 
12139
12359
  forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));
12140
12360
 
12361
+ // sever all the references to parent scopes (after this cleanup, the current scope should
12362
+ // not be retained by any of our references and should be eligible for garbage collection)
12141
12363
  if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
12142
12364
  if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
12143
12365
  if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
12144
12366
  if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
12145
12367
 
12146
- // This is bogus code that works around Chrome's GC leak
12147
- // see: https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
12368
+
12369
+ // All of the code below is bogus code that works around V8's memory leak via optimized code
12370
+ // and inline caches.
12371
+ //
12372
+ // see:
12373
+ // - https://code.google.com/p/v8/issues/detail?id=2073#c26
12374
+ // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
12375
+ // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
12376
+
12148
12377
  this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
12149
- this.$$childTail = null;
12378
+ this.$$childTail = this.$root = null;
12379
+
12380
+ // don't reset these to null in case some async task tries to register a listener/watch/task
12381
+ this.$$listeners = {};
12382
+ this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];
12383
+
12384
+ // prevent NPEs since these methods have references to properties we nulled out
12385
+ this.$destroy = this.$digest = this.$apply = noop;
12386
+ this.$on = this.$watch = function() { return noop; };
12150
12387
  },
12151
12388
 
12152
12389
  /**
@@ -13115,7 +13352,7 @@ function $SceDelegateProvider() {
13115
13352
  * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. |
13116
13353
  * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
13117
13354
  * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |
13118
- * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contens are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
13355
+ * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
13119
13356
  * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
13120
13357
  *
13121
13358
  * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
@@ -14963,7 +15200,7 @@ function limitToFilter(){
14963
15200
  * - `Array`: An array of function or string predicates. The first predicate in the array
14964
15201
  * is used for sorting, but when two items are equivalent, the next predicate is used.
14965
15202
  *
14966
- * @param {boolean=} reverse Reverse the order the array.
15203
+ * @param {boolean=} reverse Reverse the order of the array.
14967
15204
  * @returns {Array} Sorted copy of the source array.
14968
15205
  *
14969
15206
  * @example
@@ -15728,6 +15965,10 @@ function FormController(element, attrs, $scope, $animate) {
15728
15965
  * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
15729
15966
  * sub-group of controls needs to be determined.
15730
15967
  *
15968
+ * Note: the purpose of `ngForm` is to group controls,
15969
+ * but not to be a replacement for the `<form>` tag with all of its capabilities
15970
+ * (e.g. posting to the server, ...).
15971
+ *
15731
15972
  * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
15732
15973
  * related scope, under this name.
15733
15974
  *
@@ -16808,7 +17049,6 @@ function addNativeHtml5Validators(ctrl, validatorName, element) {
16808
17049
  return value;
16809
17050
  };
16810
17051
  ctrl.$parsers.push(validator);
16811
- ctrl.$formatters.push(validator);
16812
17052
  }
16813
17053
  }
16814
17054
 
@@ -18242,7 +18482,7 @@ var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {
18242
18482
 
18243
18483
  function classDirective(name, selector) {
18244
18484
  name = 'ngClass' + name;
18245
- return function() {
18485
+ return ['$animate', function($animate) {
18246
18486
  return {
18247
18487
  restrict: 'AC',
18248
18488
  link: function(scope, element, attr) {
@@ -18260,46 +18500,100 @@ function classDirective(name, selector) {
18260
18500
  // jshint bitwise: false
18261
18501
  var mod = $index & 1;
18262
18502
  if (mod !== old$index & 1) {
18263
- var classes = flattenClasses(scope.$eval(attr[name]));
18503
+ var classes = arrayClasses(scope.$eval(attr[name]));
18264
18504
  mod === selector ?
18265
- attr.$addClass(classes) :
18266
- attr.$removeClass(classes);
18505
+ addClasses(classes) :
18506
+ removeClasses(classes);
18267
18507
  }
18268
18508
  });
18269
18509
  }
18270
18510
 
18511
+ function addClasses(classes) {
18512
+ var newClasses = digestClassCounts(classes, 1);
18513
+ attr.$addClass(newClasses);
18514
+ }
18515
+
18516
+ function removeClasses(classes) {
18517
+ var newClasses = digestClassCounts(classes, -1);
18518
+ attr.$removeClass(newClasses);
18519
+ }
18520
+
18521
+ function digestClassCounts (classes, count) {
18522
+ var classCounts = element.data('$classCounts') || {};
18523
+ var classesToUpdate = [];
18524
+ forEach(classes, function (className) {
18525
+ if (count > 0 || classCounts[className]) {
18526
+ classCounts[className] = (classCounts[className] || 0) + count;
18527
+ if (classCounts[className] === +(count > 0)) {
18528
+ classesToUpdate.push(className);
18529
+ }
18530
+ }
18531
+ });
18532
+ element.data('$classCounts', classCounts);
18533
+ return classesToUpdate.join(' ');
18534
+ }
18535
+
18536
+ function updateClasses (oldClasses, newClasses) {
18537
+ var toAdd = arrayDifference(newClasses, oldClasses);
18538
+ var toRemove = arrayDifference(oldClasses, newClasses);
18539
+ toRemove = digestClassCounts(toRemove, -1);
18540
+ toAdd = digestClassCounts(toAdd, 1);
18541
+
18542
+ if (toAdd.length === 0) {
18543
+ $animate.removeClass(element, toRemove);
18544
+ } else if (toRemove.length === 0) {
18545
+ $animate.addClass(element, toAdd);
18546
+ } else {
18547
+ $animate.setClass(element, toAdd, toRemove);
18548
+ }
18549
+ }
18271
18550
 
18272
18551
  function ngClassWatchAction(newVal) {
18273
18552
  if (selector === true || scope.$index % 2 === selector) {
18274
- var newClasses = flattenClasses(newVal || '');
18275
- if(!oldVal) {
18276
- attr.$addClass(newClasses);
18277
- } else if(!equals(newVal,oldVal)) {
18278
- attr.$updateClass(newClasses, flattenClasses(oldVal));
18553
+ var newClasses = arrayClasses(newVal || []);
18554
+ if (!oldVal) {
18555
+ addClasses(newClasses);
18556
+ } else if (!equals(newVal,oldVal)) {
18557
+ var oldClasses = arrayClasses(oldVal);
18558
+ updateClasses(oldClasses, newClasses);
18279
18559
  }
18280
18560
  }
18281
18561
  oldVal = copy(newVal);
18282
18562
  }
18563
+ }
18564
+ };
18283
18565
 
18566
+ function arrayDifference(tokens1, tokens2) {
18567
+ var values = [];
18284
18568
 
18285
- function flattenClasses(classVal) {
18286
- if(isArray(classVal)) {
18287
- return classVal.join(' ');
18288
- } else if (isObject(classVal)) {
18289
- var classes = [], i = 0;
18290
- forEach(classVal, function(v, k) {
18291
- if (v) {
18292
- classes.push(k);
18293
- }
18294
- });
18295
- return classes.join(' ');
18296
- }
18297
-
18298
- return classVal;
18569
+ outer:
18570
+ for(var i = 0; i < tokens1.length; i++) {
18571
+ var token = tokens1[i];
18572
+ for(var j = 0; j < tokens2.length; j++) {
18573
+ if(token == tokens2[j]) continue outer;
18299
18574
  }
18575
+ values.push(token);
18300
18576
  }
18301
- };
18302
- };
18577
+ return values;
18578
+ }
18579
+
18580
+ function arrayClasses (classVal) {
18581
+ if (isArray(classVal)) {
18582
+ return classVal;
18583
+ } else if (isString(classVal)) {
18584
+ return classVal.split(' ');
18585
+ } else if (isObject(classVal)) {
18586
+ var classes = [], i = 0;
18587
+ forEach(classVal, function(v, k) {
18588
+ if (v) {
18589
+ classes.push(k);
18590
+ }
18591
+ });
18592
+ return classes;
18593
+ }
18594
+ return classVal;
18595
+ }
18596
+ }];
18303
18597
  }
18304
18598
 
18305
18599
  /**
@@ -18860,7 +19154,7 @@ var ngControllerDirective = [function() {
18860
19154
  * @element ANY
18861
19155
  * @priority 0
18862
19156
  * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
18863
- * click. (Event object is available as `$event`)
19157
+ * click. ({@link guide/expression#-event- Event object is available as `$event`})
18864
19158
  *
18865
19159
  * @example
18866
19160
  <example>
@@ -18941,7 +19235,7 @@ forEach(
18941
19235
  * @element ANY
18942
19236
  * @priority 0
18943
19237
  * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
18944
- * mousedown. (Event object is available as `$event`)
19238
+ * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
18945
19239
  *
18946
19240
  * @example
18947
19241
  <example>
@@ -18965,7 +19259,7 @@ forEach(
18965
19259
  * @element ANY
18966
19260
  * @priority 0
18967
19261
  * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
18968
- * mouseup. (Event object is available as `$event`)
19262
+ * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
18969
19263
  *
18970
19264
  * @example
18971
19265
  <example>
@@ -18988,7 +19282,7 @@ forEach(
18988
19282
  * @element ANY
18989
19283
  * @priority 0
18990
19284
  * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
18991
- * mouseover. (Event object is available as `$event`)
19285
+ * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
18992
19286
  *
18993
19287
  * @example
18994
19288
  <example>
@@ -19012,7 +19306,7 @@ forEach(
19012
19306
  * @element ANY
19013
19307
  * @priority 0
19014
19308
  * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
19015
- * mouseenter. (Event object is available as `$event`)
19309
+ * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
19016
19310
  *
19017
19311
  * @example
19018
19312
  <example>
@@ -19036,7 +19330,7 @@ forEach(
19036
19330
  * @element ANY
19037
19331
  * @priority 0
19038
19332
  * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
19039
- * mouseleave. (Event object is available as `$event`)
19333
+ * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
19040
19334
  *
19041
19335
  * @example
19042
19336
  <example>
@@ -19060,7 +19354,7 @@ forEach(
19060
19354
  * @element ANY
19061
19355
  * @priority 0
19062
19356
  * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
19063
- * mousemove. (Event object is available as `$event`)
19357
+ * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
19064
19358
  *
19065
19359
  * @example
19066
19360
  <example>
@@ -19127,7 +19421,8 @@ forEach(
19127
19421
  *
19128
19422
  * @element ANY
19129
19423
  * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
19130
- * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
19424
+ * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
19425
+ * and can be interrogated for keyCode, altKey, etc.)
19131
19426
  *
19132
19427
  * @example
19133
19428
  <example>
@@ -19152,7 +19447,8 @@ forEach(
19152
19447
  *
19153
19448
  * @element form
19154
19449
  * @priority 0
19155
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)
19450
+ * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
19451
+ * ({@link guide/expression#-event- Event object is available as `$event`})
19156
19452
  *
19157
19453
  * @example
19158
19454
  <example>
@@ -19203,7 +19499,7 @@ forEach(
19203
19499
  * @element window, input, select, textarea, a
19204
19500
  * @priority 0
19205
19501
  * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
19206
- * focus. (Event object is available as `$event`)
19502
+ * focus. ({@link guide/expression#-event- Event object is available as `$event`})
19207
19503
  *
19208
19504
  * @example
19209
19505
  * See {@link ng.directive:ngClick ngClick}
@@ -19219,7 +19515,7 @@ forEach(
19219
19515
  * @element window, input, select, textarea, a
19220
19516
  * @priority 0
19221
19517
  * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
19222
- * blur. (Event object is available as `$event`)
19518
+ * blur. ({@link guide/expression#-event- Event object is available as `$event`})
19223
19519
  *
19224
19520
  * @example
19225
19521
  * See {@link ng.directive:ngClick ngClick}
@@ -19235,7 +19531,7 @@ forEach(
19235
19531
  * @element window, input, select, textarea, a
19236
19532
  * @priority 0
19237
19533
  * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
19238
- * copy. (Event object is available as `$event`)
19534
+ * copy. ({@link guide/expression#-event- Event object is available as `$event`})
19239
19535
  *
19240
19536
  * @example
19241
19537
  <example>
@@ -19256,7 +19552,7 @@ forEach(
19256
19552
  * @element window, input, select, textarea, a
19257
19553
  * @priority 0
19258
19554
  * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
19259
- * cut. (Event object is available as `$event`)
19555
+ * cut. ({@link guide/expression#-event- Event object is available as `$event`})
19260
19556
  *
19261
19557
  * @example
19262
19558
  <example>
@@ -19277,7 +19573,7 @@ forEach(
19277
19573
  * @element window, input, select, textarea, a
19278
19574
  * @priority 0
19279
19575
  * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
19280
- * paste. (Event object is available as `$event`)
19576
+ * paste. ({@link guide/expression#-event- Event object is available as `$event`})
19281
19577
  *
19282
19578
  * @example
19283
19579
  <example>
@@ -20419,10 +20715,10 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
20419
20715
  * restating the styles for the .ng-hide class in CSS:
20420
20716
  * ```css
20421
20717
  * .ng-hide {
20422
- * //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...
20718
+ * /&#42; Not to worry, this will override the AngularJS default...
20423
20719
  * display:block!important;
20424
20720
  *
20425
- * //this is just another form of hiding an element
20721
+ * /&#42; this is just another form of hiding an element &#42;/
20426
20722
  * position:absolute;
20427
20723
  * top:-9999px;
20428
20724
  * left:-9999px;
@@ -20448,10 +20744,20 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
20448
20744
  * //a working example can be found at the bottom of this page
20449
20745
  * //
20450
20746
  * .my-element.ng-hide-add, .my-element.ng-hide-remove {
20451
- * transition:0.5s linear all;
20747
+ * /&#42; this is required as of 1.3x to properly
20748
+ * apply all styling in a show/hide animation &#42;/
20749
+ * transition:0s linear all;
20750
+ *
20751
+ * /&#42; this must be set as block so the animation is visible &#42;/
20452
20752
  * display:block!important;
20453
20753
  * }
20454
20754
  *
20755
+ * .my-element.ng-hide-add-active,
20756
+ * .my-element.ng-hide-remove-active {
20757
+ * /&#42; the transition is defined in the active class &#42;/
20758
+ * transition:1s linear all;
20759
+ * }
20760
+ *
20455
20761
  * .my-element.ng-hide-add { ... }
20456
20762
  * .my-element.ng-hide-add.ng-hide-add-active { ... }
20457
20763
  * .my-element.ng-hide-remove { ... }
@@ -20488,8 +20794,6 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
20488
20794
  </file>
20489
20795
  <file name="animations.css">
20490
20796
  .animate-show {
20491
- -webkit-transition:all linear 0.5s;
20492
- transition:all linear 0.5s;
20493
20797
  line-height:20px;
20494
20798
  opacity:1;
20495
20799
  padding:10px;
@@ -20502,6 +20806,12 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
20502
20806
  display:block!important;
20503
20807
  }
20504
20808
 
20809
+ .animate-show.ng-hide-add.ng-hide-add-active,
20810
+ .animate-show.ng-hide-remove.ng-hide-remove-active {
20811
+ -webkit-transition:all linear 0.5s;
20812
+ transition:all linear 0.5s;
20813
+ }
20814
+
20505
20815
  .animate-show.ng-hide {
20506
20816
  line-height:0;
20507
20817
  opacity:0;
@@ -20550,7 +20860,7 @@ var ngShowDirective = ['$animate', function($animate) {
20550
20860
  * in AngularJS and sets the display style to none (using an !important flag).
20551
20861
  * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
20552
20862
  *
20553
- * ```hrml
20863
+ * ```html
20554
20864
  * <!-- when $scope.myValue is truthy (element is hidden) -->
20555
20865
  * <div ng-hide="myValue"></div>
20556
20866
  *
@@ -21732,4 +22042,4 @@ var styleDirective = valueFn({
21732
22042
 
21733
22043
  })(window, document);
21734
22044
 
21735
- !angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>');
22045
+ !angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}</style>');