FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
code.angularjs.org/1.2.3/angular-resource.min.js at master · angular/code.angularjs.org · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Apr 17, 2025. It is now read-only.
angular
/
code.angularjs.org
Public archive
Notifications
You must be signed in to change notification settings
Fork
731
Star
149
Code
Issues
3
Pull requests
10
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
code.angularjs.org
/
1.2.3
/
angular-resource.min.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
12 lines (12 loc) · 3.04 KB
Breadcrumbs
code.angularjs.org
/
1.2.3
/
angular-resource.min.js
Copy path
File metadata and controls
12 lines (12 loc) · 3.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
/*
AngularJS v1.2.3
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(
function
(
H
,
f
,
z
)
{
'use strict'
;
var
u
=
f
.
$$minErr
(
"$resource"
)
,
A
=
/
^
(
\.
[
a
-
z
A
-
Z
_
$
]
[
0
-
9
a
-
z
A
-
Z
_
$
]
*
)
+
$
/
;
f
.
module
(
"ngResource"
,
[
"ng"
]
)
.
factory
(
"$resource"
,
[
"$http"
,
"$q"
,
function
(
D
,
E
)
{
function
n
(
f
,
h
)
{
this
.
template
=
f
;
this
.
defaults
=
h
||
{
}
;
this
.
urlParams
=
{
}
}
function
v
(
m
,
h
,
k
)
{
function
r
(
d
,
c
)
{
var
e
=
{
}
;
c
=
w
(
{
}
,
h
,
c
)
;
s
(
c
,
function
(
a
,
c
)
{
t
(
a
)
&&
(
a
=
a
(
)
)
;
var
g
;
if
(
a
&&
a
.
charAt
&&
"@"
==
a
.
charAt
(
0
)
)
{
g
=
d
;
var
b
=
a
.
substr
(
1
)
;
if
(
null
==
b
||
""
===
b
||
"hasOwnProperty"
===
b
||
!
A
.
test
(
"."
+
b
)
)
throw
u
(
"badmember"
,
b
)
;
for
(
var
b
=
b
.
split
(
"."
)
,
f
=
0
,
h
=
b
.
length
;
f
<
h
&&
g
!==
z
;
f
++
)
{
var
q
=
b
[
f
]
;
g
=
null
!==
g
?
g
[
q
]
:
z
}
}
else
g
=
a
;
e
[
c
]
=
g
}
)
;
return
e
}
function
e
(
b
)
{
return
b
.
resource
}
function
b
(
b
)
{
B
(
b
||
{
}
,
this
)
}
var
F
=
new
n
(
m
)
;
k
=
w
(
{
}
,
G
,
k
)
;
s
(
k
,
function
(
d
,
c
)
{
var
h
=
/
^
(
P
O
S
T
|
P
U
T
|
P
A
T
C
H
)
$
/
i
.
test
(
d
.
method
)
;
b
[
c
]
=
function
(
a
,
c
,
g
,
m
)
{
var
p
=
{
}
,
k
,
q
,
x
;
switch
(
arguments
.
length
)
{
case
4
:
x
=
m
,
q
=
g
;
case
3
:
case
2
:
if
(
t
(
c
)
)
{
if
(
t
(
a
)
)
{
q
=
a
;
x
=
c
;
break
}
q
=
c
;
x
=
g
}
else
{
p
=
a
;
k
=
c
;
q
=
g
;
break
}
case
1
:
t
(
a
)
?
q
=
a
:
h
?
k
=
a
:
p
=
a
;
break
;
case
0
:
break
;
default
:
throw
u
(
"badargs"
,
arguments
.
length
)
;
}
var
n
=
this
instanceof
b
,
l
=
n
?
k
:
d
.
isArray
?
[
]
:
new
b
(
k
)
,
y
=
{
}
,
v
=
d
.
interceptor
&&
d
.
interceptor
.
response
||
e
,
A
=
d
.
interceptor
&&
d
.
interceptor
.
responseError
||
z
;
s
(
d
,
function
(
b
,
a
)
{
"params"
!=
a
&&
(
"isArray"
!=
a
&&
"interceptor"
!=
a
)
&&
(
y
[
a
]
=
B
(
b
)
)
}
)
;
h
&&
(
y
.
data
=
k
)
;
F
.
setUrlParams
(
y
,
w
(
{
}
,
r
(
k
,
d
.
params
||
{
}
)
,
p
)
,
d
.
url
)
;
p
=
D
(
y
)
.
then
(
function
(
a
)
{
var
c
=
a
.
data
,
g
=
l
.
$promise
;
if
(
c
)
{
if
(
f
.
isArray
(
c
)
!==
!
!
d
.
isArray
)
throw
u
(
"badcfg"
,
d
.
isArray
?
"array"
:
"object"
,
f
.
isArray
(
c
)
?
"array"
:
"object"
)
;
d
.
isArray
?
(
l
.
length
=
0
,
s
(
c
,
function
(
a
)
{
l
.
push
(
new
b
(
a
)
)
}
)
)
:
(
B
(
c
,
l
)
,
l
.
$promise
=
g
)
}
l
.
$resolved
=
!
0
;
a
.
resource
=
l
;
return
a
}
,
function
(
a
)
{
l
.
$resolved
=
!
0
;
(
x
||
C
)
(
a
)
;
return
E
.
reject
(
a
)
}
)
;
p
=
p
.
then
(
function
(
a
)
{
var
c
=
v
(
a
)
;
(
q
||
C
)
(
c
,
a
.
headers
)
;
return
c
}
,
A
)
;
return
n
?
p
:
(
l
.
$promise
=
p
,
l
.
$resolved
=
!
1
,
l
)
}
;
b
.
prototype
[
"$"
+
c
]
=
function
(
a
,
d
,
g
)
{
t
(
a
)
&&
(
g
=
d
,
d
=
a
,
a
=
{
}
)
;
a
=
b
[
c
]
.
call
(
this
,
a
,
this
,
d
,
g
)
;
return
a
.
$promise
||
a
}
}
)
;
b
.
bind
=
function
(
b
)
{
return
v
(
m
,
w
(
{
}
,
h
,
b
)
,
k
)
}
;
return
b
}
var
G
=
{
get
:
{
method
:
"GET"
}
,
save
:
{
method
:
"POST"
}
,
query
:
{
method
:
"GET"
,
isArray
:
!
0
}
,
remove
:
{
method
:
"DELETE"
}
,
"delete"
:
{
method
:
"DELETE"
}
}
,
C
=
f
.
noop
,
s
=
f
.
forEach
,
w
=
f
.
extend
,
B
=
f
.
copy
,
t
=
f
.
isFunction
;
n
.
prototype
=
{
setUrlParams
:
function
(
m
,
h
,
k
)
{
var
r
=
this
,
e
=
k
||
r
.
template
,
b
,
n
,
d
=
r
.
urlParams
=
{
}
;
s
(
e
.
split
(
/
\W
/
)
,
function
(
c
)
{
if
(
"hasOwnProperty"
===
c
)
throw
u
(
"badname"
)
;
!
/
^
\d
+
$
/
.
test
(
c
)
&&
(
c
&&
RegExp
(
"(^|[^\\\\]):"
+
c
+
"(\\W|$)"
)
.
test
(
e
)
)
&&
(
d
[
c
]
=
!
0
)
}
)
;
e
=
e
.
replace
(
/
\\
:
/
g
,
":"
)
;
h
=
h
||
{
}
;
s
(
r
.
urlParams
,
function
(
c
,
d
)
{
b
=
h
.
hasOwnProperty
(
d
)
?
h
[
d
]
:
r
.
defaults
[
d
]
;
f
.
isDefined
(
b
)
&&
null
!==
b
?
(
n
=
encodeURIComponent
(
b
)
.
replace
(
/
%
4
0
/
gi
,
"@"
)
.
replace
(
/
%
3
A
/
gi
,
":"
)
.
replace
(
/
%
2
4
/
g
,
"$"
)
.
replace
(
/
%
2
C
/
gi
,
","
)
.
replace
(
/
%
2
0
/
g
,
"%20"
)
.
replace
(
/
%
2
6
/
gi
,
"&"
)
.
replace
(
/
%
3
D
/
gi
,
"="
)
.
replace
(
/
%
2
B
/
gi
,
"+"
)
,
e
=
e
.
replace
(
RegExp
(
":"
+
d
+
"(\\W|$)"
,
"g"
)
,
n
+
"$1"
)
)
:
e
=
e
.
replace
(
RegExp
(
"(/?):"
+
d
+
"(\\W|$)"
,
"g"
)
,
function
(
a
,
c
,
b
)
{
return
"/"
==
b
.
charAt
(
0
)
?
b
:
c
+
b
}
)
}
)
;
e
=
e
.
replace
(
/
\/
+
$
/
,
""
)
;
e
=
e
.
replace
(
/
\/
\.
(?
=
\w
+
(
$
|
\?
)
)
/
,
"."
)
;
m
.
url
=
e
.
replace
(
/
\/
\\
\.
/
,
"/."
)
;
s
(
h
,
function
(
b
,
d
)
{
r
.
urlParams
[
d
]
||
(
m
.
params
=
m
.
params
||
{
}
,
m
.
params
[
d
]
=
b
)
}
)
}
}
;
return
v
}
]
)
}
)
(
window
,
window
.
angular
)
;
//# sourceMappingURL=angular-resource.min.js.map
Back
|
FazBrowse Home
|
New Git URL