Load network from URL
If you have a REST service that provides you with the network data, you can enter its url directly into the initial-url
atribute of the <force-layout>
. In this case we are providing list of ids for products
, countries
and years
, as well as maximum number of links we want to retrieve with the numberOfLinks
parameter. We also include <aspect-selector>
into our app so that we can select aspects after they are loaded. We also provide an example of a simple REST server built with Node and Express frameworks that serves data from an SQLite database.
<div ng-app="networkApp" ng-controller="networkCtrl">
<aspect-selector></aspect-selector>
<force-layout initial-url="http://zel.irb.hr/matija/data?numberOfLinks=2000&products=[40,98,29,72]&countries=[59,53,37,12,13,29,101,102,196,93]&years=[1995,1996,1997,1998]"></force-layout>
</div>