title: How to Use D3 to Angular Project from Bower Install D3
body: <p>I am trying to include D3 into my Angular Application but can't seem to load the D3 from the Bower Install because Angular says it can't find it or it was mis-spelled. The application is set up to use gulp to get the bower_components and build from there. Is there something different with d3 that keeps it from being included the gulp build process?</p>
  
  <p>Here is my component, I'm not able to get access to the D3 source code. Shouldn't I be able to access that from the bower install? I've seen some stack overflow questions where they say to create a simple "d3" module and return a d3 variable from it in the factory, but I get undefined from window.d3...?</p>
  
  <pre><code>   angular.module("diagram", ["d3"]).directive("ersDiagram", ["$compile", "$document", function($compile:ng.ICompileProvider, $document:ng.IDocumentService) {
      return {
          restrict: "E",
          replace: true,
          templateUrl: "diagram/template/diagram.html",
          scope: {
              nodes: "=",
              edges: "=",
              autoResizeGraph: "@?",
              enableMouseWheelZoom: "@?",
              selectedNode: "=?",
              selectedEdge: "=?",
              height: "@?",
              onSelected: "&amp;?",
              onEdgeSelected: "&amp;?",
              direction: "@?",
              enableZoomButtons: "@?"
          },
          controller: DiagramComponent,
          bindToController: true,
          controllerAs: "ctrl",
          link: function (scope:ng.IScope, elem:ng.IAugmentedJQuery, attrs:ng.IAttributes, ctrl:any) {
                  //d3 code here
                  //get undefined for all d3 code
            }
  </code></pre>
  
  <p>I don't understand why I can't just access D3 by injecting it into the application? Could it have something to do with gulp not including it in the build? And does anybody know, if a common case, how to get D3 to be included in the build?</p>
  
  <p>Been stuck for a while, help is very much appreciated!</p>
  
  <p>If you need to see any more specific code just let me know.</p>