我如何在CanJS中更改路线网址

时间:2016-04-05 11:02:56

标签: javascript jquery canjs

我有route.attr:

can.route.attr({type:"list",id:"list",val:""})

location.hash -> "#!update/edit&val=113"

如何将其更改为#!list / list并销毁val:""在网址

我用这个:can.route.attr({type:"list",id:"list",val:null})

location.hash -> "#!update/edit&val="

1 个答案:

答案 0 :(得分:1)

与其他[JPEG] - Compression Type = Baseline [JPEG] - Data Precision = 8 bits [JPEG] - Image Height = 3104 pixels [JPEG] - Image Width = 4192 pixels [JPEG] - Number of Components = 3 [JPEG] - Component 1 = Y component: Quantization table 0, Sampling factors 2 horiz/1 vert [JPEG] - Component 2 = Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert [JPEG] - Component 3 = Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert [Exif IFD0] - Software = Flyme [Exif IFD0] - Orientation = Top, left side (Horizontal / normal) [Exif IFD0] - Unknown tag (0x0224) = 1 [Exif IFD0] - Unknown tag (0x0225) = [Exif IFD0] - Date/Time = 2016:04:13 10:20:08 [Exif IFD0] - Model = m1 note [Exif IFD0] - Unknown tag (0x0222) = 0 [Exif IFD0] - Unknown tag (0x0223) = 0 [Exif IFD0] - Unknown tag (0x0220) = 0 [Exif IFD0] - Unknown tag (0x0221) = 0 [Exif IFD0] - Y Resolution = 72 dots per inch [Exif IFD0] - X Resolution = 72 dots per inch [Exif IFD0] - YCbCr Positioning = Datum point [Exif IFD0] - Resolution Unit = Inch [Exif IFD0] - Image Description = [Exif IFD0] - Make = Meizu [GPS] - GPS Img Direction = 49 degrees [GPS] - GPS Img Direction Ref = Magnetic direction [Exif SubIFD] - Date/Time Digitized = 2016:04:13 10:20:08 [Exif SubIFD] - Color Space = sRGB [Exif SubIFD] - Date/Time Original = 2016:04:13 10:20:08 [Exif SubIFD] - FlashPix Version = 1.00 [Exif SubIFD] - Metering Mode = Center weighted average [Exif SubIFD] - Exposure Bias Value = 0 EV [Exif SubIFD] - Exif Image Height = 3104 pixels [Exif SubIFD] - Exif Version = 2.20 [Exif SubIFD] - Exif Image Width = 4192 pixels [Exif SubIFD] - Focal Length = 3.8 mm [Exif SubIFD] - Digital Zoom Ratio = 1 [Exif SubIFD] - White Balance = (Other) [Exif SubIFD] - Scene Capture Type = Standard [Exif SubIFD] - Flash = Flash did not fire [Exif SubIFD] - White Balance Mode = Auto white balance [Exif SubIFD] - Exposure Mode = Auto exposure [Exif SubIFD] - Exposure Time = 79999/1000000 sec [Exif SubIFD] - ISO Speed Ratings = 810 [Exif SubIFD] - Components Configuration = YCbCr [Exif SubIFD] - F-Number = f/2.2 [Exif SubIFD] - Exposure Program = Unknown (0) [Interoperability] - Interoperability Index = Recommended Exif Interoperability Rules (ExifR98) [Interoperability] - Interoperability Version = 1.00 [Exif Thumbnail] - Orientation = Top, left side (Horizontal / normal) [Exif Thumbnail] - Compression = JPEG (old-style) [Exif Thumbnail] - Thumbnail Offset = 962 bytes [Exif Thumbnail] - YCbCr Positioning = Datum point [Exif Thumbnail] - Thumbnail Length = 0 bytes [Exif Thumbnail] - Y Resolution = 72 dots per inch [Exif Thumbnail] - Resolution Unit = Inch [Exif Thumbnail] - X Resolution = 72 dots per inch 非常相似,从can.Map完全删除密钥需要使用can.route。试试吧;你应该看到can.route.removeAttr("val")完全从哈希中消失。