javascript - AngularJS http gets the wrong json file -


i'm trying follow along angularjs tutorial making email client.

i downloaded source code chapters 01 07. started own project in folder called "application".

project folder

the code running without throwing errors, thing it's wrong json file being loaded!

i copied json 04 , changed first from hello world (originally ticketfactory). changed every others json files contain location, chapter 04 became ticketfactory chapter 04 , on.

now starting server in application directory gives me this:

console

browser result

i have no clue getting .json file..? perhaps old request?

my code looks this

inboxfactory.js

(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 error!', data);         });     };      return exports;   }  })(); 

it might bit different tutorial because used atom's angularjs snippet package. looks enough me, again - i'm still learning!

it cache problem !

do f12, , check "network" tabs (with f5...): retry full path of file, it's contents,...


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -