@@ -599,27 +599,27 @@ function $UrlMatcherFactory() {
599
599
function valFromString ( val ) { return val != null ? val . toString ( ) . replace ( / ~ 2 F / g, "/" ) . replace ( / ~ ~ / g, "~" ) : val ; }
600
600
601
601
var $types = { } , enqueue = true , typeQueue = [ ] , injector , defaultTypes = {
602
- string : {
602
+ " string" : {
603
603
encode : valToString ,
604
604
decode : valFromString ,
605
605
// TODO: in 1.0, make string .is() return false if value is undefined/null by default.
606
606
// In 0.2.x, string params are optional by default for backwards compat
607
607
is : function ( val ) { return val == null || ! isDefined ( val ) || typeof val === "string" ; } ,
608
608
pattern : / [ ^ / ] * /
609
609
} ,
610
- int : {
610
+ " int" : {
611
611
encode : valToString ,
612
612
decode : function ( val ) { return parseInt ( val , 10 ) ; } ,
613
613
is : function ( val ) { return isDefined ( val ) && this . decode ( val . toString ( ) ) === val ; } ,
614
614
pattern : / \d + /
615
615
} ,
616
- bool : {
616
+ " bool" : {
617
617
encode : function ( val ) { return val ? 1 : 0 ; } ,
618
618
decode : function ( val ) { return parseInt ( val , 10 ) !== 0 ; } ,
619
619
is : function ( val ) { return val === true || val === false ; } ,
620
620
pattern : / 0 | 1 /
621
621
} ,
622
- date : {
622
+ " date" : {
623
623
encode : function ( val ) {
624
624
if ( ! this . is ( val ) )
625
625
return undefined ;
@@ -638,14 +638,14 @@ function $UrlMatcherFactory() {
638
638
pattern : / [ 0 - 9 ] { 4 } - (?: 0 [ 1 - 9 ] | 1 [ 0 - 2 ] ) - (?: 0 [ 1 - 9 ] | [ 1 - 2 ] [ 0 - 9 ] | 3 [ 0 - 1 ] ) / ,
639
639
capture : / ( [ 0 - 9 ] { 4 } ) - ( 0 [ 1 - 9 ] | 1 [ 0 - 2 ] ) - ( 0 [ 1 - 9 ] | [ 1 - 2 ] [ 0 - 9 ] | 3 [ 0 - 1 ] ) /
640
640
} ,
641
- json : {
641
+ " json" : {
642
642
encode : angular . toJson ,
643
643
decode : angular . fromJson ,
644
644
is : angular . isObject ,
645
645
equals : angular . equals ,
646
646
pattern : / [ ^ / ] * /
647
647
} ,
648
- any : { // does not encode/decode
648
+ " any" : { // does not encode/decode
649
649
encode : angular . identity ,
650
650
decode : angular . identity ,
651
651
equals : angular . equals ,
0 commit comments