typedef sap.ui.core.UIComponent.RoutingMetadata

Visiblity: public
Available since: N/A
Module: sap/ui/core/UIComponent
Application Component: CA-UI5-COR

An object containing the routing-relevant configurations, routes, targets, config.

Example for a config:

    routing: {
        "routes": {
            "welcome": {
                // If the URL has no hash e.g.: index.html or index.html# , this route will be matched.
                "pattern": "",
                // Displays the target called "welcome" specified in metadata.routing.targets.welcome.
                "target": "welcome"
            }
            "product": {
                "pattern": "Product/{id}",
                "target": "product"
            }
        }
        // Default values for targets
        "config": {
            // For a detailed documentation of these parameters have a look at the sap.ui.core.routing.Targets documentation
            "viewType": "XML",
            "controlId": "App",
            "controlAggregation": "pages",
            "viewNamespace": "myApplication.namespace",
            // If you are using the mobile library, you have to use an sap.m.Router, to get support for
            // the controls sap.m.App, sap.m.SplitApp, sap.m.NavContainer and sap.m.SplitContainer.
            "routerClass": "sap.m.routing.Router"
            // What happens if no route matches the hash?
            "bypassed": {
                // the not found target gets displayed
                "target": "notFound"
            }
        }
        "targets": {
            "welcome": {
                // Referenced by the route "welcome"
                "viewName": "Welcome",
                "viewLevel": 0
            },
            "product": {
                // Referenced by the route "Product"
                "viewName": "Product",
                "viewLevel": 1
            }
            "notFound": {
                // Referenced by the bypassed section of the config
                "viewName": "NotFound"
            }
        }
    }


Nodes Overview

Node Description

Methods Overview

Method Description