title: Invalid 'reference' directive syntax error when referencing angular 1.5
body: <p>I have upgraded to Typescript 2.0.3 yesterday and updated the reference path to</p>
  
  <pre><code>/// &lt;reference types="angular" /&gt;
  </code></pre>
  
  <p>after installing the typings for Angular 1.5x using the following command</p>
  
  <pre><code>npm install -s @types/angular
  </code></pre>
  
  <p>I get the error when I build the project and the error doesn't go away.</p>
  
  <blockquote>
    <p>Invalid 'reference' directive syntax</p>
  </blockquote>
  
  <p>How does one fix this?</p>
  
  <pre><code>/// &lt;reference types="angular" /&gt;
  /// &lt;reference types="d3" /&gt;
  
  (function () {
      'use strict';
  
      var app = angular.module('charts', []);
  
      app.controller('mainCtrl', function mainCtrl($scope, appService) {
  
          var vm = this;
  
          vm.data1 = [1, 2, 3, 4];
          vm.data2 = [4, 5, 7, 11];
          vm.update = function (d, i) {
              vm.data1 = appService.GetRandomData();
              console.log('new data1', vm.data1);
          };
  
          vm.update2 = function (d, i) {
              vm.data2 = appService.GetRandomData();
              console.log('new data2', vm.data2);
          };
      });
  
      app.directive('barChart', function ($timeout) {
          var chart = d3.custom.barChart();
          return {
              restrict: 'E',
              replace: true,
              scope: true,
              bindToController: {
                  data: '=',
              },
              controller: 'mainCtrl',
              controllerAs: 'ctrl',
              link: function (scope, element, attrs, ctrl) {
                  var chartEl = d3.select(element[0]);
  
                  chartEl.datum(ctrl.data).call(chart)
              }
          }
      });
  
      app.directive('chartForm', function () {
          return {
              restrict: 'E',
              replace: true,
              controller: 'mainCtrl',
              templateUrl: 'chartform.html'
          }
      });
  
      app.service('appService', function () {
          this.GetRandomData = function () {
              var rdata;
  
              rdata = d3.range(~~(Math.random() * 50) + 1).map(function (d, i) {
                  return ~~(Math.random() * 100);
              });
  
              return rdata;
          }
      });
  
  } ());
  </code></pre>