rails-angularjs 1.4.9 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rails-angularjs/version.rb +1 -1
- data/vendor/assets/javascripts/angular-animate.js +296 -48
- data/vendor/assets/javascripts/angular-animate.min.js +52 -51
- data/vendor/assets/javascripts/angular-animate.min.js.map +3 -3
- data/vendor/assets/javascripts/angular-aria.js +51 -51
- data/vendor/assets/javascripts/angular-aria.min.js +10 -10
- data/vendor/assets/javascripts/angular-aria.min.js.map +2 -2
- data/vendor/assets/javascripts/angular-cookies.js +9 -8
- data/vendor/assets/javascripts/angular-cookies.min.js +2 -2
- data/vendor/assets/javascripts/angular-cookies.min.js.map +1 -1
- data/vendor/assets/javascripts/angular-loader.js +16 -3
- data/vendor/assets/javascripts/angular-loader.min.js +5 -5
- data/vendor/assets/javascripts/angular-loader.min.js.map +2 -2
- data/vendor/assets/javascripts/angular-message-format.js +2 -2
- data/vendor/assets/javascripts/angular-message-format.min.js +2 -2
- data/vendor/assets/javascripts/angular-messages.js +7 -5
- data/vendor/assets/javascripts/angular-messages.min.js +8 -8
- data/vendor/assets/javascripts/angular-messages.min.js.map +2 -2
- data/vendor/assets/javascripts/angular-mocks.js +323 -30
- data/vendor/assets/javascripts/angular-resource.js +116 -42
- data/vendor/assets/javascripts/angular-resource.min.js +11 -10
- data/vendor/assets/javascripts/angular-resource.min.js.map +3 -3
- data/vendor/assets/javascripts/angular-route.js +36 -11
- data/vendor/assets/javascripts/angular-route.min.js +11 -11
- data/vendor/assets/javascripts/angular-route.min.js.map +2 -2
- data/vendor/assets/javascripts/angular-sanitize.js +280 -246
- data/vendor/assets/javascripts/angular-sanitize.min.js +11 -12
- data/vendor/assets/javascripts/angular-sanitize.min.js.map +3 -3
- data/vendor/assets/javascripts/angular-scenario.js +1227 -456
- data/vendor/assets/javascripts/angular-touch.js +114 -12
- data/vendor/assets/javascripts/angular-touch.min.js +10 -9
- data/vendor/assets/javascripts/angular-touch.min.js.map +3 -3
- data/vendor/assets/javascripts/angular.js +1227 -456
- data/vendor/assets/javascripts/angular.min.js +302 -293
- data/vendor/assets/javascripts/angular.min.js.map +3 -3
- metadata +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license AngularJS v1.5.0
|
3
|
+
* (c) 2010-2016 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
(function(window, angular, undefined) {'use strict';
|
@@ -68,6 +68,9 @@ function shallowClearAndCopy(src, dst) {
|
|
68
68
|
* @ngdoc service
|
69
69
|
* @name $resource
|
70
70
|
* @requires $http
|
71
|
+
* @requires ng.$log
|
72
|
+
* @requires $q
|
73
|
+
* @requires ng.$timeout
|
71
74
|
*
|
72
75
|
* @description
|
73
76
|
* A factory which creates a resource object that lets you interact with
|
@@ -112,9 +115,9 @@ function shallowClearAndCopy(src, dst) {
|
|
112
115
|
* URL `/path/greet?salutation=Hello`.
|
113
116
|
*
|
114
117
|
* If the parameter value is prefixed with `@` then the value for that parameter will be extracted
|
115
|
-
* from the corresponding property on the `data` object (provided when calling an action method).
|
116
|
-
* example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of
|
117
|
-
* will be `data.someProp`.
|
118
|
+
* from the corresponding property on the `data` object (provided when calling an action method).
|
119
|
+
* For example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of
|
120
|
+
* `someParam` will be `data.someProp`.
|
118
121
|
*
|
119
122
|
* @param {Object.<Object>=} actions Hash with declaration of custom actions that should extend
|
120
123
|
* the default set of resource actions. The declaration should be created in the format of {@link
|
@@ -148,9 +151,9 @@ function shallowClearAndCopy(src, dst) {
|
|
148
151
|
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
149
152
|
* transform function or an array of such functions. The transform function takes the http
|
150
153
|
* response body and headers and returns its transformed (typically deserialized) version.
|
151
|
-
* By default, transformResponse will contain one function that checks if the response looks
|
152
|
-
* a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior,
|
153
|
-
* `transformResponse` to an empty array: `transformResponse: []`
|
154
|
+
* By default, transformResponse will contain one function that checks if the response looks
|
155
|
+
* like a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior,
|
156
|
+
* set `transformResponse` to an empty array: `transformResponse: []`
|
154
157
|
* - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
|
155
158
|
* GET request, otherwise if a cache instance built with
|
156
159
|
* {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
|
@@ -158,8 +161,11 @@ function shallowClearAndCopy(src, dst) {
|
|
158
161
|
* - **`timeout`** – `{number}` – timeout in milliseconds.<br />
|
159
162
|
* **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are
|
160
163
|
* **not** supported in $resource, because the same value would be used for multiple requests.
|
161
|
-
* If you
|
162
|
-
*
|
164
|
+
* If you are looking for a way to cancel requests, you should use the `cancellable` option.
|
165
|
+
* - **`cancellable`** – `{boolean}` – if set to true, the request made by a "non-instance" call
|
166
|
+
* will be cancelled (if not already completed) by calling `$cancelRequest()` on the call's
|
167
|
+
* return value. Calling `$cancelRequest()` for a non-cancellable or an already
|
168
|
+
* completed/cancelled request will have no effect.<br />
|
163
169
|
* - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
|
164
170
|
* XHR object. See
|
165
171
|
* [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
|
@@ -171,12 +177,13 @@ function shallowClearAndCopy(src, dst) {
|
|
171
177
|
* with `http response` object. See {@link ng.$http $http interceptors}.
|
172
178
|
*
|
173
179
|
* @param {Object} options Hash with custom settings that should extend the
|
174
|
-
* default `$resourceProvider` behavior. The
|
175
|
-
*
|
176
|
-
* Where:
|
180
|
+
* default `$resourceProvider` behavior. The supported options are:
|
177
181
|
*
|
178
182
|
* - **`stripTrailingSlashes`** – {boolean} – If true then the trailing
|
179
183
|
* slashes from any calculated URL will be stripped. (Defaults to true.)
|
184
|
+
* - **`cancellable`** – {boolean} – If true, the request made by a "non-instance" call will be
|
185
|
+
* cancelled (if not already completed) by calling `$cancelRequest()` on the call's return value.
|
186
|
+
* This can be overwritten per action. (Defaults to false.)
|
180
187
|
*
|
181
188
|
* @returns {Object} A resource "class" object with methods for the default set of resource actions
|
182
189
|
* optionally extended with custom `actions`. The default set contains these actions:
|
@@ -224,7 +231,7 @@ function shallowClearAndCopy(src, dst) {
|
|
224
231
|
* Class actions return empty instance (with additional properties below).
|
225
232
|
* Instance actions return promise of the action.
|
226
233
|
*
|
227
|
-
* The Resource instances and
|
234
|
+
* The Resource instances and collections have these additional properties:
|
228
235
|
*
|
229
236
|
* - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
|
230
237
|
* instance or collection.
|
@@ -244,6 +251,11 @@ function shallowClearAndCopy(src, dst) {
|
|
244
251
|
* rejection), `false` before that. Knowing if the Resource has been resolved is useful in
|
245
252
|
* data-binding.
|
246
253
|
*
|
254
|
+
* The Resource instances and collections have these additional methods:
|
255
|
+
*
|
256
|
+
* - `$cancelRequest`: If there is a cancellable, pending request related to the instance or
|
257
|
+
* collection, calling this method will abort the request.
|
258
|
+
*
|
247
259
|
* @example
|
248
260
|
*
|
249
261
|
* # Credit card resource
|
@@ -288,6 +300,11 @@ function shallowClearAndCopy(src, dst) {
|
|
288
300
|
*
|
289
301
|
* Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
|
290
302
|
* `headers`.
|
303
|
+
*
|
304
|
+
* @example
|
305
|
+
*
|
306
|
+
* # User resource
|
307
|
+
*
|
291
308
|
* When the data is returned from the server then the object is an instance of the resource type and
|
292
309
|
* all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
|
293
310
|
* operations (create, read, update, delete) on server-side data.
|
@@ -306,10 +323,10 @@ function shallowClearAndCopy(src, dst) {
|
|
306
323
|
*
|
307
324
|
```js
|
308
325
|
var User = $resource('/user/:userId', {userId:'@id'});
|
309
|
-
User.get({userId:123}, function(
|
310
|
-
|
311
|
-
|
312
|
-
//
|
326
|
+
User.get({userId:123}, function(user, getResponseHeaders){
|
327
|
+
user.abc = true;
|
328
|
+
user.$save(function(user, putResponseHeaders) {
|
329
|
+
//user => saved user object
|
313
330
|
//putResponseHeaders => $http header getter
|
314
331
|
});
|
315
332
|
});
|
@@ -324,8 +341,11 @@ function shallowClearAndCopy(src, dst) {
|
|
324
341
|
$scope.user = user;
|
325
342
|
});
|
326
343
|
```
|
327
|
-
|
344
|
+
*
|
345
|
+
* @example
|
346
|
+
*
|
328
347
|
* # Creating a custom 'PUT' request
|
348
|
+
*
|
329
349
|
* In this example we create a custom method on our resource to make a PUT request
|
330
350
|
* ```js
|
331
351
|
* var app = angular.module('app', ['ngResource', 'ngRoute']);
|
@@ -353,6 +373,34 @@ function shallowClearAndCopy(src, dst) {
|
|
353
373
|
* // This will PUT /notes/ID with the note object in the request payload
|
354
374
|
* }]);
|
355
375
|
* ```
|
376
|
+
*
|
377
|
+
* @example
|
378
|
+
*
|
379
|
+
* # Cancelling requests
|
380
|
+
*
|
381
|
+
* If an action's configuration specifies that it is cancellable, you can cancel the request related
|
382
|
+
* to an instance or collection (as long as it is a result of a "non-instance" call):
|
383
|
+
*
|
384
|
+
```js
|
385
|
+
// ...defining the `Hotel` resource...
|
386
|
+
var Hotel = $resource('/api/hotel/:id', {id: '@id'}, {
|
387
|
+
// Let's make the `query()` method cancellable
|
388
|
+
query: {method: 'get', isArray: true, cancellable: true}
|
389
|
+
});
|
390
|
+
|
391
|
+
// ...somewhere in the PlanVacationController...
|
392
|
+
...
|
393
|
+
this.onDestinationChanged = function onDestinationChanged(destination) {
|
394
|
+
// We don't care about any pending request for hotels
|
395
|
+
// in a different destination any more
|
396
|
+
this.availableHotels.$cancelRequest();
|
397
|
+
|
398
|
+
// Let's query for hotels in '<destination>'
|
399
|
+
// (calls: /api/hotel?location=<destination>)
|
400
|
+
this.availableHotels = Hotel.query({location: destination});
|
401
|
+
};
|
402
|
+
```
|
403
|
+
*
|
356
404
|
*/
|
357
405
|
angular.module('ngResource', ['ng']).
|
358
406
|
provider('$resource', function() {
|
@@ -373,7 +421,7 @@ angular.module('ngResource', ['ng']).
|
|
373
421
|
}
|
374
422
|
};
|
375
423
|
|
376
|
-
this.$get = ['$http', '$log', '$q', function($http, $log, $q) {
|
424
|
+
this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) {
|
377
425
|
|
378
426
|
var noop = angular.noop,
|
379
427
|
forEach = angular.forEach,
|
@@ -441,7 +489,9 @@ angular.module('ngResource', ['ng']).
|
|
441
489
|
}
|
442
490
|
if (!(new RegExp("^\\d+$").test(param)) && param &&
|
443
491
|
(new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
|
444
|
-
urlParams[param] =
|
492
|
+
urlParams[param] = {
|
493
|
+
isQueryParamValue: (new RegExp("\\?.*=:" + param + "(?:\\W|$)")).test(url)
|
494
|
+
};
|
445
495
|
}
|
446
496
|
});
|
447
497
|
url = url.replace(/\\:/g, ':');
|
@@ -451,10 +501,14 @@ angular.module('ngResource', ['ng']).
|
|
451
501
|
});
|
452
502
|
|
453
503
|
params = params || {};
|
454
|
-
forEach(self.urlParams, function(
|
504
|
+
forEach(self.urlParams, function(paramInfo, urlParam) {
|
455
505
|
val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
|
456
506
|
if (angular.isDefined(val) && val !== null) {
|
457
|
-
|
507
|
+
if (paramInfo.isQueryParamValue) {
|
508
|
+
encodedVal = encodeUriQuery(val, true);
|
509
|
+
} else {
|
510
|
+
encodedVal = encodeUriSegment(val);
|
511
|
+
}
|
458
512
|
url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
|
459
513
|
return encodedVal + p1;
|
460
514
|
});
|
@@ -526,6 +580,20 @@ angular.module('ngResource', ['ng']).
|
|
526
580
|
|
527
581
|
forEach(actions, function(action, name) {
|
528
582
|
var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
|
583
|
+
var numericTimeout = action.timeout;
|
584
|
+
var cancellable = angular.isDefined(action.cancellable) ? action.cancellable :
|
585
|
+
(options && angular.isDefined(options.cancellable)) ? options.cancellable :
|
586
|
+
provider.defaults.cancellable;
|
587
|
+
|
588
|
+
if (numericTimeout && !angular.isNumber(numericTimeout)) {
|
589
|
+
$log.debug('ngResource:\n' +
|
590
|
+
' Only numeric values are allowed as `timeout`.\n' +
|
591
|
+
' Promises are not supported in $resource, because the same value would ' +
|
592
|
+
'be used for multiple requests. If you are looking for a way to cancel ' +
|
593
|
+
'requests, you should use the `cancellable` option.');
|
594
|
+
delete action.timeout;
|
595
|
+
numericTimeout = null;
|
596
|
+
}
|
529
597
|
|
530
598
|
Resource[name] = function(a1, a2, a3, a4) {
|
531
599
|
var params = {}, data, success, error;
|
@@ -574,6 +642,8 @@ angular.module('ngResource', ['ng']).
|
|
574
642
|
defaultResponseInterceptor;
|
575
643
|
var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
|
576
644
|
undefined;
|
645
|
+
var timeoutDeferred;
|
646
|
+
var numericTimeoutPromise;
|
577
647
|
|
578
648
|
forEach(action, function(value, key) {
|
579
649
|
switch (key) {
|
@@ -583,28 +653,27 @@ angular.module('ngResource', ['ng']).
|
|
583
653
|
case 'params':
|
584
654
|
case 'isArray':
|
585
655
|
case 'interceptor':
|
586
|
-
|
587
|
-
case 'timeout':
|
588
|
-
if (value && !angular.isNumber(value)) {
|
589
|
-
$log.debug('ngResource:\n' +
|
590
|
-
' Only numeric values are allowed as `timeout`.\n' +
|
591
|
-
' Promises are not supported in $resource, because the same value would ' +
|
592
|
-
'be used for multiple requests.\n' +
|
593
|
-
' If you need support for cancellable $resource actions, you should ' +
|
594
|
-
'upgrade to version 1.5 or higher.');
|
595
|
-
}
|
656
|
+
case 'cancellable':
|
596
657
|
break;
|
597
658
|
}
|
598
659
|
});
|
599
660
|
|
661
|
+
if (!isInstanceCall && cancellable) {
|
662
|
+
timeoutDeferred = $q.defer();
|
663
|
+
httpConfig.timeout = timeoutDeferred.promise;
|
664
|
+
|
665
|
+
if (numericTimeout) {
|
666
|
+
numericTimeoutPromise = $timeout(timeoutDeferred.resolve, numericTimeout);
|
667
|
+
}
|
668
|
+
}
|
669
|
+
|
600
670
|
if (hasBody) httpConfig.data = data;
|
601
671
|
route.setUrlParams(httpConfig,
|
602
672
|
extend({}, extractParams(data, action.params || {}), params),
|
603
673
|
action.url);
|
604
674
|
|
605
675
|
var promise = $http(httpConfig).then(function(response) {
|
606
|
-
var data = response.data
|
607
|
-
promise = value.$promise;
|
676
|
+
var data = response.data;
|
608
677
|
|
609
678
|
if (data) {
|
610
679
|
// Need to convert action.isArray to boolean in case it is undefined
|
@@ -629,24 +698,28 @@ angular.module('ngResource', ['ng']).
|
|
629
698
|
}
|
630
699
|
});
|
631
700
|
} else {
|
701
|
+
var promise = value.$promise; // Save the promise
|
632
702
|
shallowClearAndCopy(data, value);
|
633
|
-
value.$promise = promise;
|
703
|
+
value.$promise = promise; // Restore the promise
|
634
704
|
}
|
635
705
|
}
|
636
|
-
|
637
|
-
value.$resolved = true;
|
638
|
-
|
639
706
|
response.resource = value;
|
640
707
|
|
641
708
|
return response;
|
642
709
|
}, function(response) {
|
643
|
-
value.$resolved = true;
|
644
|
-
|
645
710
|
(error || noop)(response);
|
646
|
-
|
647
711
|
return $q.reject(response);
|
648
712
|
});
|
649
713
|
|
714
|
+
promise.finally(function() {
|
715
|
+
value.$resolved = true;
|
716
|
+
if (!isInstanceCall && cancellable) {
|
717
|
+
value.$cancelRequest = angular.noop;
|
718
|
+
$timeout.cancel(numericTimeoutPromise);
|
719
|
+
timeoutDeferred = numericTimeoutPromise = httpConfig.timeout = null;
|
720
|
+
}
|
721
|
+
});
|
722
|
+
|
650
723
|
promise = promise.then(
|
651
724
|
function(response) {
|
652
725
|
var value = responseInterceptor(response);
|
@@ -661,6 +734,7 @@ angular.module('ngResource', ['ng']).
|
|
661
734
|
// - return the instance / collection
|
662
735
|
value.$promise = promise;
|
663
736
|
value.$resolved = false;
|
737
|
+
if (cancellable) value.$cancelRequest = timeoutDeferred.resolve;
|
664
738
|
|
665
739
|
return value;
|
666
740
|
}
|
@@ -1,14 +1,15 @@
|
|
1
1
|
/*
|
2
|
-
AngularJS v1.
|
3
|
-
(c) 2010-
|
2
|
+
AngularJS v1.5.0
|
3
|
+
(c) 2010-2016 Google, Inc. http://angularjs.org
|
4
4
|
License: MIT
|
5
5
|
*/
|
6
|
-
(function(
|
7
|
-
this.$get=["$http","$log","$q",function(
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
(
|
13
|
-
|
6
|
+
(function(Q,d,G){'use strict';function H(t,g){g=g||{};d.forEach(g,function(d,q){delete g[q]});for(var q in t)!t.hasOwnProperty(q)||"$"===q.charAt(0)&&"$"===q.charAt(1)||(g[q]=t[q]);return g}var z=d.$$minErr("$resource"),N=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,g=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
|
7
|
+
this.$get=["$http","$log","$q","$timeout",function(q,M,I,J){function A(d,h){return encodeURIComponent(d).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,h?"%20":"+")}function B(d,h){this.template=d;this.defaults=v({},g.defaults,h);this.urlParams={}}function K(e,h,n,k){function c(a,b){var c={};b=v({},h,b);u(b,function(b,h){x(b)&&(b=b());var f;if(b&&b.charAt&&"@"==b.charAt(0)){f=a;var l=b.substr(1);if(null==l||""===l||"hasOwnProperty"===l||!N.test("."+
|
8
|
+
l))throw z("badmember",l);for(var l=l.split("."),m=0,k=l.length;m<k&&d.isDefined(f);m++){var r=l[m];f=null!==f?f[r]:G}}else f=b;c[h]=f});return c}function O(a){return a.resource}function m(a){H(a||{},this)}var t=new B(e,k);n=v({},g.defaults.actions,n);m.prototype.toJSON=function(){var a=v({},this);delete a.$promise;delete a.$resolved;return a};u(n,function(a,b){var h=/^(POST|PUT|PATCH)$/i.test(a.method),e=a.timeout,E=d.isDefined(a.cancellable)?a.cancellable:k&&d.isDefined(k.cancellable)?k.cancellable:
|
9
|
+
g.defaults.cancellable;e&&!d.isNumber(e)&&(M.debug("ngResource:\n Only numeric values are allowed as `timeout`.\n Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete a.timeout,e=null);m[b]=function(f,l,k,g){var r={},n,w,C;switch(arguments.length){case 4:C=g,w=k;case 3:case 2:if(x(l)){if(x(f)){w=f;C=l;break}w=l;C=k}else{r=f;n=l;w=k;break}case 1:x(f)?
|
10
|
+
w=f:h?n=f:r=f;break;case 0:break;default:throw z("badargs",arguments.length);}var D=this instanceof m,p=D?n:a.isArray?[]:new m(n),s={},A=a.interceptor&&a.interceptor.response||O,B=a.interceptor&&a.interceptor.responseError||G,y,F;u(a,function(a,b){switch(b){default:s[b]=P(a);case "params":case "isArray":case "interceptor":case "cancellable":}});!D&&E&&(y=I.defer(),s.timeout=y.promise,e&&(F=J(y.resolve,e)));h&&(s.data=n);t.setUrlParams(s,v({},c(n,a.params||{}),r),a.url);r=q(s).then(function(f){var c=
|
11
|
+
f.data;if(c){if(d.isArray(c)!==!!a.isArray)throw z("badcfg",b,a.isArray?"array":"object",d.isArray(c)?"array":"object",s.method,s.url);if(a.isArray)p.length=0,u(c,function(b){"object"===typeof b?p.push(new m(b)):p.push(b)});else{var l=p.$promise;H(c,p);p.$promise=l}}f.resource=p;return f},function(b){(C||L)(b);return I.reject(b)});r.finally(function(){p.$resolved=!0;!D&&E&&(p.$cancelRequest=d.noop,J.cancel(F),y=F=s.timeout=null)});r=r.then(function(b){var a=A(b);(w||L)(a,b.headers);return a},B);return D?
|
12
|
+
r:(p.$promise=r,p.$resolved=!1,E&&(p.$cancelRequest=y.resolve),p)};m.prototype["$"+b]=function(a,c,d){x(a)&&(d=c,c=a,a={});a=m[b].call(this,a,this,c,d);return a.$promise||a}});m.bind=function(a){return K(e,v({},h,a),n)};return m}var L=d.noop,u=d.forEach,v=d.extend,P=d.copy,x=d.isFunction;B.prototype={setUrlParams:function(e,h,n){var k=this,c=n||k.template,g,m,q="",a=k.urlParams={};u(c.split(/\W/),function(b){if("hasOwnProperty"===b)throw z("badname");!/^\d+$/.test(b)&&b&&(new RegExp("(^|[^\\\\]):"+
|
13
|
+
b+"(\\W|$)")).test(c)&&(a[b]={isQueryParamValue:(new RegExp("\\?.*=:"+b+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(t,function(a){q=a;return""});h=h||{};u(k.urlParams,function(a,e){g=h.hasOwnProperty(e)?h[e]:k.defaults[e];d.isDefined(g)&&null!==g?(m=a.isQueryParamValue?A(g,!0):A(g,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+e+"(\\W|$)","g"),function(a,b){return m+b})):c=c.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(a,b,c){return"/"==
|
14
|
+
c.charAt(0)?c:b+c})});k.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");e.url=q+c.replace(/\/\\\./,"/.");u(h,function(a,c){k.urlParams[c]||(e.params=e.params||{},e.params[c]=a)})}};return K}]})})(window,window.angular);
|
14
15
|
//# sourceMappingURL=angular-resource.min.js.map
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"version":3,
|
3
3
|
"file":"angular-resource.min.js",
|
4
|
-
"lineCount":
|
5
|
-
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAA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BC,CAJF,CADpB,CAZ4C,CAAtD,CAwBIX,EAAA5F,SAAAC,qBAAJ,GACEmB,CADF,CACQA,CAAAN,QAAA,CAAY,MAAZ,CAAoB,EAApB,CADR,EACmC,GADnC,CAMAM,EAAA,CAAMA,CAAAN,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAEN4E,EAAAtE,IAAA,CAAa0E,CAAb,CAAiC1E,CAAAN,QAAA,CAAY,QAAZ,CAAsB,IAAtB,CAIjCzB,EAAA,CAAQsE,CAAR,CAAgB,QAAQ,CAACrE,CAAD,CAAQC,CAAR,CAAa,CAC9BqG,CAAA1E,UAAA,CAAe3B,CAAf,CAAL,GACEmG,CAAA/B,OACA,CADgB+B,CAAA/B,OAChB,EADiC,EACjC,CAAA+B,CAAA/B,OAAA,CAAcpE,CAAd,CAAA,CAAqBD,CAFvB,CADmC,CAArC,CA9DgD,CADlC,CA8RlB,OAAO6B,EAnV2E,CAAxE,CAlBmB,CADnC,CA/YsC,CAArC,CAAD,CA0vBGpC,MA1vBH,CA0vBWA,MAAAC,QA1vBX;",
|
6
6
|
"sources":["angular-resource.js"],
|
7
|
-
"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","provider","PROTOCOL_AND_DOMAIN_REGEX","defaults","stripTrailingSlashes","actions","method","isArray","$get","$http","$log","$q","Route","template","extend","urlParams","resourceFactory","url","paramDefaults","options","extractParams","data","actionParams","ids","isFunction","path","test","keys","split","i","ii","length","isDefined","obj","defaultResponseInterceptor","response","resource","Resource","route","prototype","toJSON","Resource.prototype.toJSON","$promise","$resolved","action","name","hasBody","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","
|
7
|
+
"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","provider","PROTOCOL_AND_DOMAIN_REGEX","defaults","stripTrailingSlashes","actions","method","isArray","$get","$http","$log","$q","$timeout","encodeUriQuery","val","pctEncodeSpaces","encodeURIComponent","replace","Route","template","extend","urlParams","resourceFactory","url","paramDefaults","options","extractParams","data","actionParams","ids","isFunction","path","test","keys","split","i","ii","length","isDefined","obj","defaultResponseInterceptor","response","resource","Resource","route","prototype","toJSON","Resource.prototype.toJSON","$promise","$resolved","action","name","hasBody","numericTimeout","timeout","cancellable","isNumber","debug","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","timeoutDeferred","numericTimeoutPromise","copy","defer","promise","resolve","setUrlParams","then","item","push","noop","reject","finally","$cancelRequest","cancel","headers","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","encodedVal","protocolAndDomain","param","RegExp","isQueryParamValue","match","paramInfo","urlParam","p1","leadingSlashes","tail"]
|
8
8
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license AngularJS v1.5.0
|
3
|
+
* (c) 2010-2016 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
(function(window, angular, undefined) {'use strict';
|
@@ -105,8 +105,17 @@ function $RouteProvider() {
|
|
105
105
|
* If all the promises are resolved successfully, the values of the resolved promises are
|
106
106
|
* injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
|
107
107
|
* fired. If any of the promises are rejected the
|
108
|
-
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired.
|
109
|
-
*
|
108
|
+
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired.
|
109
|
+
* For easier access to the resolved dependencies from the template, the `resolve` map will
|
110
|
+
* be available on the scope of the route, under `$resolve` (by default) or a custom name
|
111
|
+
* specified by the `resolveAs` property (see below). This can be particularly useful, when
|
112
|
+
* working with {@link angular.Module#component components} as route templates.<br />
|
113
|
+
* <div class="alert alert-warning">
|
114
|
+
* **Note:** If your scope already contains a property with this name, it will be hidden
|
115
|
+
* or overwritten. Make sure, you specify an appropriate name for this property, that
|
116
|
+
* does not collide with other properties on the scope.
|
117
|
+
* </div>
|
118
|
+
* The map object is:
|
110
119
|
*
|
111
120
|
* - `key` – `{string}`: a name of a dependency to be injected into the controller.
|
112
121
|
* - `factory` - `{string|function}`: If `string` then it is an alias for a service.
|
@@ -116,7 +125,10 @@ function $RouteProvider() {
|
|
116
125
|
* `ngRoute.$routeParams` will still refer to the previous route within these resolve
|
117
126
|
* functions. Use `$route.current.params` to access the new route parameters, instead.
|
118
127
|
*
|
119
|
-
* - `
|
128
|
+
* - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on
|
129
|
+
* the scope of the route. If omitted, defaults to `$resolve`.
|
130
|
+
*
|
131
|
+
* - `redirectTo` – `{(string|function())=}` – value to update
|
120
132
|
* {@link ng.$location $location} path with and trigger route redirection.
|
121
133
|
*
|
122
134
|
* If `redirectTo` is a function, it will be called with the following parameters:
|
@@ -129,13 +141,13 @@ function $RouteProvider() {
|
|
129
141
|
* The custom `redirectTo` function is expected to return a string which will be used
|
130
142
|
* to update `$location.path()` and `$location.search()`.
|
131
143
|
*
|
132
|
-
* - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
|
144
|
+
* - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()`
|
133
145
|
* or `$location.hash()` changes.
|
134
146
|
*
|
135
147
|
* If the option is set to `false` and url in the browser changes, then
|
136
148
|
* `$routeUpdate` event is broadcasted on the root scope.
|
137
149
|
*
|
138
|
-
* - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
|
150
|
+
* - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive
|
139
151
|
*
|
140
152
|
* If the option is set to `true`, then the particular route can be matched without being
|
141
153
|
* case sensitive
|
@@ -265,7 +277,7 @@ function $RouteProvider() {
|
|
265
277
|
* @property {Object} current Reference to the current route definition.
|
266
278
|
* The route definition contains:
|
267
279
|
*
|
268
|
-
* - `controller`: The controller constructor as
|
280
|
+
* - `controller`: The controller constructor as defined in the route definition.
|
269
281
|
* - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
|
270
282
|
* controller instantiation. The `locals` contain
|
271
283
|
* the resolved values of the `resolve` map. Additionally the `locals` also contain:
|
@@ -273,6 +285,10 @@ function $RouteProvider() {
|
|
273
285
|
* - `$scope` - The current route scope.
|
274
286
|
* - `$template` - The current route template HTML.
|
275
287
|
*
|
288
|
+
* The `locals` will be assigned to the route scope's `$resolve` property. You can override
|
289
|
+
* the property name, using `resolveAs` in the route definition. See
|
290
|
+
* {@link ngRoute.$routeProvider $routeProvider} for more info.
|
291
|
+
*
|
276
292
|
* @property {Object} routes Object with all route configuration Objects as its properties.
|
277
293
|
*
|
278
294
|
* @description
|
@@ -468,10 +484,18 @@ function $RouteProvider() {
|
|
468
484
|
*/
|
469
485
|
reload: function() {
|
470
486
|
forceReload = true;
|
487
|
+
|
488
|
+
var fakeLocationEvent = {
|
489
|
+
defaultPrevented: false,
|
490
|
+
preventDefault: function fakePreventDefault() {
|
491
|
+
this.defaultPrevented = true;
|
492
|
+
forceReload = false;
|
493
|
+
}
|
494
|
+
};
|
495
|
+
|
471
496
|
$rootScope.$evalAsync(function() {
|
472
|
-
|
473
|
-
|
474
|
-
commitRoute();
|
497
|
+
prepareRoute(fakeLocationEvent);
|
498
|
+
if (!fakeLocationEvent.defaultPrevented) commitRoute();
|
475
499
|
});
|
476
500
|
},
|
477
501
|
|
@@ -981,6 +1005,7 @@ function ngViewFillContentFactory($compile, $controller, $route) {
|
|
981
1005
|
$element.data('$ngControllerController', controller);
|
982
1006
|
$element.children().data('$ngControllerController', controller);
|
983
1007
|
}
|
1008
|
+
scope[current.resolveAs || '$resolve'] = locals;
|
984
1009
|
|
985
1010
|
link(scope);
|
986
1011
|
}
|