Pular para o conteúdo principal

Router

Reference

Parameters

routes
list

The router's page structure. Defines the routes and their respective content, as well as their rules.

Component data2-core-primitives@Route

initialPath

Define the initial path to be rendered when the router initializes.

Component data2-core-primitives@String

login

Artboard used for login in your application. Whenever a route with a declared policy with an Authentication Strategy gets accessed by a logged-out user, the login artboard will be rendered instead of the route's content.

Component data2-core-types@ArtboardReference

resetPassword

Pick an Artboard to be used in a Password Reset flow.

Component data2-core-types@ArtboardReference

notFound

The artboard to show when a route with no matching "path" is accessed.

Component data2-core-types@ArtboardReference

sitemap

Enables the auto generation of a Sitemap, for bots and users to be able to explore your application without requiring to directly access every page.

Component data2-core-primitives@Boolean

splash

Pick an Artboard to display while the main page content is still loading.

Component data2-core-types@ArtboardReference

notAllowed

Shows another artboard when the access of a route gets denied by a policy. The "Not Allowed" option on the Route Itself takes precedence.

Component data2-core-types@ArtboardReference

onBeforeRouteEnter

An action to be executed before every route enter, before executing each route's own "onEnter" action.

Component data2-core-types@Interaction

onAfterRouteEnter

An action to be executed after every route enter, after each route's own "onEnter" action.

Component data2-core-types@Interaction

onBeforeRouteExit

An action to be executed before every route exit, before executing each route's own "onExit" action.

Component data2-core-types@Interaction

onAfterRouteExit

An action to be executed after every route exit, after each route's own "onExit" action.

Component data2-core-types@Interaction

Interactions

goBack

goTo

Arguments

  1. Path to route data2-core-primitives@String
    required

Path to redirect user

  1. Preserve Query data2-core-primitives@Boolean
    required

Preserve query string parameters preserve query parameters on navigating.

open

Arguments

  1. Link to open data2-core-primitives@String

    required

  2. Target data2-core-primitives@String

One of '_blank' | '_self' | '_parent' | '_top'

Where to open the link

close

Closes a window that was opened via router.open.

Arguments

  1. Link to open data2-core-primitives@String

    required

  2. Target data2-core-primitives@String

One of '_blank' | '_self' | '_parent' | '_top'

Where to open the link