hash.route.js:使用 location.hash 的简单灵活的路由系统

时间:2021-06-29 15:19:55
【文件属性】:
文件名称:hash.route.js:使用 location.hash 的简单灵活的路由系统
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-29 15:19:55
JavaScript hash.route.js,一个简单灵活的路由系统。 设置哈希路由侦听器和不同的匹配规则: 空场比赛。 // Match empty route hash ( "" ) . on ( "change" , function ( evt ) { console . log ( arguments ) ; } ) ; 完全符合。 将匹配确切的网址。 例如 // home, will match // /home/, will match. Notice the slashes don't affect pattern matching. // home/sweet, will not match hash ( "home" ) . on ( "change" , function ( evt ) { console . log ( arguments ) ; } ) ; 与
【文件预览】:
hash.route.js-master
----tests()
--------hash.js(2KB)
----LICENSE(1KB)
----.gitignore(9B)
----hash.route.js(9KB)
----README.md(4KB)
----.jshintrc(340B)
----bower.json(419B)

网友评论