API Reference

Route.gd

Learn about the Route resource and its data.


What is the Route Resource?

The Route resource is used by the Router.gd to hold all data associated with active routes (layouts and pages). This is used over a standard dictionary to provide type safety.

File

Below is the entire code of the Route.gd file.

route.gd
extends Resource
class_name Route
 
## A Route represents a layout or page.
 
# A reference to the Node in the scene tree.
var node: Node
 
# A dictionary of arbitrary data associated with this route.
# Route data is merged together for the current `Router.page`.
var data: Dictionary[String, Variant]
.gd