Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restore the state of a angular dart program based on the url?

In an Angular.Dart application, different views can be managed via routes.

How do I read the current route (in a piece of code not related to a view), such as to update the application state if someone copy/pastes an url ? (i.e. the entry point of the application is not the original, default, url)

like image 871
rodrigob Avatar asked Dec 02 '25 01:12

rodrigob


1 Answers

IMHO his is the default behaviour.

see https://angulardart.org/tutorial/08-ch06-view.html 'Connecting a route to a view'

You can encode parameters in the url and initialize your components using this values (state), no matter if you open the URL using a link in your application or enter it manually.

like image 86
Günter Zöchbauer Avatar answered Dec 03 '25 20:12

Günter Zöchbauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!