[windup-dev] @GraphAdjacency impl

Ondrej Zizka ozizka at redhat.com
Tue Nov 1 00:38:10 EDT 2016


     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



More information about the windup-dev mailing list