{I" class:ETI"BundledAsset; FI"logical_path; TI"angular-resource.js; FI" pathname; TI"r/Users/yafeilee/.rvm/gems/ruby-2.1.5/gems/angularjs-rails-1.3.8/vendor/assets/javascripts/angular-resource.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+ΤΗΠTI"length; TihI"digest; TI"%14448b9afe834ada54b0103afd8397df; FI"source; TI"h/** * @license AngularJS v1.3.8 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; var $resourceMinErr = angular.$$minErr('$resource'); // Helper functions and regex to lookup a dotted path on an object // stopping at undefined/null. The path must be composed of ASCII // identifiers (just like $parse) var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/; function isValidDottedPath(path) { return (path != null && path !== '' && path !== 'hasOwnProperty' && MEMBER_NAME_REGEX.test('.' + path)); } function lookupDottedPath(obj, path) { if (!isValidDottedPath(path)) { throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path); } var keys = path.split('.'); for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) { var key = keys[i]; obj = (obj !== null) ? obj[key] : undefined; } return obj; } /** * Create a shallow copy of an object and clear other fields from the destination */ function shallowClearAndCopy(src, dst) { dst = dst || {}; angular.forEach(dst, function(value, key) { delete dst[key]; }); for (var key in src) { if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { dst[key] = src[key]; } } return dst; } /** * @ngdoc module * @name ngResource * @description * * # ngResource * * The `ngResource` module provides interaction support with RESTful services * via the $resource service. * * *
* * See {@link ngResource.$resource `$resource`} for usage. */ /** * @ngdoc service * @name $resource * @requires $http * * @description * A factory which creates a resource object that lets you interact with * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. * * The returned resource object has action methods which provide high-level behaviors without * the need to interact with the low level {@link ng.$http $http} service. * * Requires the {@link ngResource `ngResource`} module to be installed. * * By default, trailing slashes will be stripped from the calculated URLs, * which can pose problems with server backends that do not expect that * behavior. This can be disabled by configuring the `$resourceProvider` like * this: * * ```js app.config(['$resourceProvider', function($resourceProvider) { // Don't strip trailing slashes from calculated URLs $resourceProvider.defaults.stripTrailingSlashes = false; }]); * ``` * * @param {string} url A parametrized URL template with parameters prefixed by `:` as in * `/user/:username`. If you are using a URL with a port number (e.g. * `http://example.com:8080/api`), it will be respected. * * If you are using a url with a suffix, just add the suffix, like this: * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')` * or even `$resource('http://example.com/resource/:resource_id.:format')` * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you * can escape it with `/\.`. * * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in * `actions` methods. If any of the parameter value is a function, it will be executed every time * when a param value needs to be obtained for a request (unless the param was overridden). * * Each key value in the parameter object is first bound to url template if present and then any * excess keys are appended to the url search query after the `?`. * * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in * URL `/path/greet?salutation=Hello`. * * If the parameter value is prefixed with `@` then the value for that parameter will be extracted * from the corresponding property on the `data` object (provided when calling an action method). For * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam` * will be `data.someProp`. * * @param {Object.