...

/

Dynamic Routing with Path Converters

Dynamic Routing with Path Converters

Let's learn how to use path converters with dynamic URL routes in our application.

In the example from the previous lesson, we used the path <age>, where age was a variable. Then, the value that we appended in the URL at the place of age, that value was passed as a string type parameter to the view function age(). This is the default behavior that the string data type parameters will have. However, we can use a converter to convert this value into another datatype before passing it to the view function. A general use-case for this conversion could be that we want to take the age of the user and apply computations to it to find ...