Navigate to a URL. Returns a promise that resolves when navigation is complete.
It's preferred to navigate with navigate
instead of this method, since URLs are more brittle.
If the given URL begins with a /
, router will navigate absolutely.
If the given URL does not begin with /
, the router will navigate relative to this component.
Source
Future<dynamic> navigateByUrl(String url, [bool _skipLocationChange = false, bool _replaceState = false]) { return this._currentNavigation = this._currentNavigation.then((_) { this.lastNavigationAttempt = url; this._startNavigating(); return this._afterPromiseFinishNavigating( this.recognize(url).then((instruction) { if (instruction == null) { return false; } return this._navigate(instruction, _skipLocationChange, _replaceState); })); }); }