D3js Collapsible Force Layout [need example]

I need to show a network of users using this: “https://bl.ocks.org/mbostock/1062288”, he tried based on this: “https://github.com/datencia/d3js-angular2-example”, but I have not been able to do it successfully, someone could help me by doing a basic example.

PS: The main problem is that I did not build the tree, I do not know which d3js plugin to take.