import {
  Component,
  OnInit
} from '@angular/core';

import d3 from './d3';

@Component({
  selector: 'hello-world',
  template: 'Hello world from the {{ projectTitle }} module!'
})
export class HelloWorld implements OnInit {
  projectTitle: string = 'weighted screen';

  ngOnInit() {
    d3.select("body").transition()
    .style("background-color", "black");
  }
}

import {
  Component
} from '@angular/core';

@Component({
  selector: 'hello-world',
  template: 'Hello world from the {{ projectTitle }} module!'
})
export class HelloWorld {
  projectTitle: string = 'weighted screen';
}

--- 
+++ 
@@ -1,11 +1,19 @@
 import {
-  Component
+  Component,
+  OnInit
 } from '@angular/core';
+
+import d3 from './d3';
 
 @Component({
   selector: 'hello-world',
   template: 'Hello world from the {{ projectTitle }} module!'
 })
-export class HelloWorld {
+export class HelloWorld implements OnInit {
   projectTitle: string = 'weighted screen';
+
+  ngOnInit() {
+    d3.select("body").transition()
+    .style("background-color", "black");
+  }
 }
Add test code to try out imported d3 module
