--- tags: brew-js --- # Router properties ### `app.path` Gets or sets the current path. ```typescript path: string ``` When setting a new path, the path will be resolved with [app.resolvePath](#appresolvePath) for path starting with `~/`, containing `.` or `..` and parameter substitutions. Setting this property has identical behavior to call `app.navigate` without the `replace` parameter. ### `app.basePath` Gets the base path of any valid app path. ```typescript readonly basePath: string; ``` It is always `/` unless `explicitBaseUrl` options is set to `true`. ### `app.initialPath` Gets the initial path before the app is initialized. ```typescript readonly initialPath: string; ``` ### `app.route` Gets the Route object for accessing route parameters. ```typescript readonly route: Route ``` Setting unrecorgnized keys will have no effects. Also, setting one parameter may unset other parameters if the new matched route does not contains such parameters. Therefore, when setting multiple parameters at once, use `Route.set`. See [Route object](/gagQb_LfSzm4yxk1F8WdAA). ### `app.routes` Gets a readonly copy of the routes supplied to `useRouter`. ```typescript readonly routes: ReadonlyArray<string>; ``` ### `app.canNavigateBack` Gets if user can move back to previous page (or screen) without leaving the app. ```typescript readonly canNavigateBack: boolean; ``` ### `app.canNavigateForward` ==Since `0.4.9`== Gets if user can move forward to next page (or screen) without leaving the app. ```typescript readonly canNavigateForward: boolean; ``` ### `app.previousPath` Gets the path that will be navigated to if user click 'Back' on browser or by calling `app.back()`. ```typescript readonly previousPath: string | null; ```