<script>
var router = new kendo.Router();
router.route("/myPage", function(){
console.log("the /myPage route was triggered!");
});
// #/myPage
//http://localhost:30233/kendoSPA.aspx#/myPage
//con un parametro
router.route("/foo/:id", function (id) {
console.log("the /foo/" + id + " route was triggered!");
});
//http://localhost:30233/kendoSPA.aspx#/foo/1
// #/foo/1
router.route("/foo/:bar/baz/:quux/:id", function (bar, quux, id) {
console.log(bar, quux, id);
});
//varios parametros
// ... matches routes like #/foo/this/baz/is/awesome
//http://localhost:30233/kendoSPA.aspx#/foo/this/baz/is/awesome
router.start();
console.log("Hola");
</script>
var router = new kendo.Router();
router.route("/myPage", function(){
console.log("the /myPage route was triggered!");
});
// #/myPage
//http://localhost:30233/kendoSPA.aspx#/myPage
//con un parametro
router.route("/foo/:id", function (id) {
console.log("the /foo/" + id + " route was triggered!");
});
//http://localhost:30233/kendoSPA.aspx#/foo/1
// #/foo/1
router.route("/foo/:bar/baz/:quux/:id", function (bar, quux, id) {
console.log(bar, quux, id);
});
//varios parametros
// ... matches routes like #/foo/this/baz/is/awesome
//http://localhost:30233/kendoSPA.aspx#/foo/this/baz/is/awesome
router.start();
console.log("Hola");
</script>
No hay comentarios:
Publicar un comentario