AngularJS http gets the wrong json file
<p>I'm trying to follow along a AngularJS tutorial about making a <a href="http://www.thinkful.com/learn/angularjs-tutorial-build-a-gmail-clone/Factories#Factories" rel="nofollow noreferrer">Email Client</a>.</p>

<p>I downloaded the source code with all chapters from 01 to 07. Started my own project in a folder called "Application".</p>

<p><a href="https://i.stack.imgur.com/sAFkQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sAFkQ.png" alt="Project Folder"></a></p>

<p>The code is running without throwing any errors, but the thing is that <strong>it's the wrong JSON file that is being loaded!</strong></p>

<p>I copied the json from 04 and changed the first <code>from</code> to be <code>Hello World</code> (originally <code>TicketFactory</code>). Changed every others json files to contain their location, so chapter 04 became <code>TicketFactory chapter 04</code> and so on. </p>

<p>Now starting the server in the <code>Application</code> directory gives me this:</p>

<p><a href="https://i.stack.imgur.com/AYwev.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AYwev.png" alt="Console"></a></p>

<p><a href="https://i.stack.imgur.com/o4XZ1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o4XZ1.png" alt="browser result"></a></p>

<p>I have no clue where it is getting this .json file..? Perhaps an old GET request?</p>

<p>My code looks like this</p>

<blockquote>
  <p>InboxFactory.js</p>
</blockquote>

<pre><code>(function() {
  'use strict';

  angular
    .module('EmailApp')
    .factory('InboxFactory', myfactory);

  myfactory.$inject = ['$q','$http', '$location'];

  function myfactory($q, $http, $location){
    var exports = {};

    exports.getMessages = function () {
      return $http.get('json/emails.json')
        .error(function(data) {
          console.log('There was an error!', data);
        });
    };

    return exports;
  }

})();
</code></pre>

<p>It might look a bit different from the tutorial because I used Atom's AngularJS snippet package. But it looks good enough for me, but then again - I'm still learning! </p>