Finds a router from the current location.

This can be used to get access to a router in JavaScript. This assume that a Router has been declared somewhere higher in the UX tree (it need not be in the same file).

<Page>
    <JavaScript dep:router="findRouter()">
        exports.go = function() {
            router.goto( "anotherPageName" )
        }
    </JavaScript>

    <Button Alignment="Center" Clicked="{go}"/>
</Page>

Location

Namespace
Fuse.Navigation
Package
Fuse.Navigation 2.9.1
Show Uno properties and methods

Interface of FindRouter

Inherited from Expression

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Implemented Interfaces