[ ]
Programmatically change current location (route) so that the element
in argument becomes visible.
Call this method will change window.location.href
accordingly.
Element in argument can be any HtmlElement, but it must be nested under FnxRouterBehavior element.
Source
/// Programmatically change current location (route) so that the `element` in argument becomes visible.
/// Call this method will change `window.location.href` accordingly.
///
/// Element in argument can be any HtmlElement, but it must be nested under [FnxRouterBehavior] element.
void navigateToElement(Element element, [List<String> params = null]) {
FnxRouterBehavior _router = _findParentRouter(element);
if (_router == null) {
throw "Cannot navigate to $element, it has no FnxRouterBehavior parent";
}
navigateAbsolute(_router.absoluteRoute, params);
}