mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
rename to pathjs
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/// <reference path="pathjs.d.ts" />
|
||||
|
||||
Path.map("/test/:id")
|
||||
.to(()=>{ });
|
||||
|
||||
Path.listen();
|
||||
|
||||
//History
|
||||
Path.history.listen(() =>{
|
||||
|
||||
});
|
||||
|
||||
var initial = Path.history.initial;
|
||||
|
||||
//Core
|
||||
var route = Path.core.route("/test/:id");
|
||||
|
||||
function test1() {
|
||||
|
||||
}
|
||||
|
||||
route.enter(test1);
|
||||
|
||||
function test2() {
|
||||
|
||||
}
|
||||
|
||||
var funs = new Array<Function>();
|
||||
|
||||
funs.push(test1);
|
||||
funs.push(test2);
|
||||
|
||||
route.enter(funs);
|
||||
Reference in New Issue
Block a user