[windup-dev] NavigationService
David Klingenberg
dklingen at redhat.com
Wed Nov 9 04:11:29 EST 2016
I like the idea.
I'm not fan of angular router either.
David
On Wed, Nov 9, 2016 at 3:01 AM, Ondrej Zizka <ozizka at redhat.com> wrote:
> Devs.
>
> In Angular, I miss a good routing mechanism like other web frameworks have
>
> Angular:
>
> editApplication(application: RegisteredApplication) {
> this._router.navigate(['/edit-application', application.id]);
> }
>
> Other framework:
>
> public void editApplication(Application application) {
> setResponsePage(ApplicationPage.class, new
> PageParameters().add("app", application));
> }
>
> Which is often shortened, if the components implements an interface,
>
> setResponsePage(ApplicationPage.navigate(application));
>
>
> How about creating a Navigator which would work similarly.
>
> editApplication(application: RegisteredApplication) {
> this._navigator.navigate(ApplicationComponent, application);
> }
>
> The advantage is that it's type safe and the constants are at a single
> point rather than scattered across the web app (or at the component's
> class).
>
> WDYT?
>
> Ondra
>
>
>
> --
> --
> Ondrej Zizka, Windup project, Brno
>
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/windup-dev/attachments/20161109/69269733/attachment.html
More information about the windup-dev
mailing list