this example coded as an angular directive with optional config http://bost.ocks.org/mike/sankey/
The Directive is located in js/view.js.
to get started use: <d3sankey-Directive config="config"></d3cluster-Directive>
The repo contains a whole AngularJS example. You only have to start it on a (local) Webserver