title: Grunt Karma PhantomJS - SyntaxError: Unexpected token '>'?
body: <p>I keep getting an error when running this in my terminal (at the location of gruntfile.js):</p>
  
  <pre><code>grunt karma
  </code></pre>
  
  <p>The solutions here either didn't work or are no longer an option - <a href="https://github.com/vojtajina/ng-directive-testing/issues/2" rel="nofollow noreferrer">https://github.com/vojtajina/ng-directive-testing/issues/2</a></p>
  
  <p>Here is the output:</p>
  
  <pre><code>Running "karma:unit" (karma) task
  26 05 2017 13:43:15.838:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:8082/
  26 05 2017 13:43:15.840:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
  26 05 2017 13:43:15.848:INFO [launcher]: Starting browser PhantomJS
  26 05 2017 13:43:15.955:ERROR [phantomjs.launcher]: Fontconfig warning: ignoring C.UTF-8: not a valid language tag
  
  26 05 2017 13:43:16.130:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket 9TxdacwF4rc7mUB0AAAA with id 76282796
  
  PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  SyntaxError: Unexpected token '&gt;'
  at app/client/app.js:2
  
  
  PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  SyntaxError: Unexpected token '&gt;'
  at app/client/paths/home/homeCtrl.js:2
  </code></pre>
  
  <p>Here is my code:</p>
  
  <p>karma.config.js</p>
  
  <pre><code>module.exports = function(config) {
      config.set({
  
      frameworks: ['jasmine'],
  
  
      files: [
        'bower_components/angular/angular.js',
        'bower_components/angular-mocks/angular-mocks.js',
        'app/**/*.js'
      ],
  
      port: 8082,
  
      browsers: ['PhantomJS'],
  
      plugins: [
         'karma-phantomjs-launcher',
         'karma-jasmine',
         'karma-ng-html2js-preprocessor'
      ],
  
      logLevel: config.LOG_INFO,
  })};
  </code></pre>
  
  <p>grunt test block for karma in gruntfile.js</p>
  
  <pre><code>karma: {
      unit: {
          configFile: 'karma.config.js',
          singleRun: true
      }
  }
  </code></pre>
  
  <p>homeCtrl.spec.js</p>
  
  <pre><code>describe('HomeCtrl', function() {
      beforeEach(module('myApp'));
  
      var HomeCtrl;
      beforeEach(inject(function($controller){ 
          HomeCtrl = $controller('HomeCtrl');
      }));
  
      describe('message', function() {
          it('should read hello', function() {
              expect(HomeCtrl.message).toBe('hello');
          });
      });
  </code></pre>
  
  <p>});</p>
  
  <p>homeCtrl.js</p>
  
  <pre><code>angular.module('myApp')
      .controller('HomeCtrl', ($scope) =&gt; {
          $scope.message = 'hello';    
      })
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>angular.module('myApp', ['ngRoute', 'ngMaterial'])
      .config(($routeProvider) =&gt; { 
          $routeProvider.when("/", { templateUrl : "paths/home/home.html" });
      }); 
  </code></pre>
  
  <p>Here is the folder structure:
  <a href="https://i.stack.imgur.com/ncQI3.png" rel="nofollow noreferrer">https://i.stack.imgur.com/ncQI3.png</a></p>
  
  <p>Any input would be much appreciated, thanks.</p>