destroy

Unbinds the router instance listeners from the URL fragment part changes.

Example

<script>
var router = new kendo.Router();

router.route("/users/:id", function(id) {
    console.log("User route activated for id:", id);
});

$(function() {
    router.start();
    
    // Navigate to trigger the route
    router.navigate("/users/123");
    
    // Later, clean up the router when no longer needed
    router.destroy();
    
    console.log("Router destroyed - no longer listening to URL changes");
});
</script>
In this article
destroy
Not finding the help you need?
Contact Support