NavigationService
by Ondrej Zizka
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
8 years, 1 month
Windup 3.0.0.Alpha1 tagged and released
by Marek Novotny
Windup 3.0.0.Alpha1 was tagged and uploaded to JBoss.org repository
(synchronization to Maven Central is in progress automatically)
What have been released?
Windup core
Windup rulesets
Windup distribution
Windup Maven plugin
Get released bits a warm welcome and use it while it is hot.
P.S. this release is the first signal of 3.x.
--
Marek Novotny
--
Windup team member
Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno
8 years, 1 month
@GraphAdjacency impl
by Ondrej Zizka
Hi,
GraphAdjacency has this in the impl:
return this.http.get(url).map((vertices:any) => {
return graphService.fromJSON(vertices[0],
target.http);
});
What's the idea behind this.http vs. target.http?
`target` is the class where the decorator is present, and `this` is the
instance.
I can understand that it needs to be somewhere, but then why pass it in
the parameter?
And how does the value get to the model class? fromJSON() sets it on the
instance.
Ondra
--
--
Ondrej Zizka, Windup project, Brno
8 years, 1 month