You are on page 1of 38

<!

DOCTYPE html>
<html itemscope itemtype="http://schema.org/QAPage">
<head>
<title>javascript - Getting Json data from text file in AngularJS - Stack Overfl
ow</title>
<link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/
img/favicon.ico?v=4f32ecc8f43d">
<link rel="apple-touch-icon image_src" href="https://cdn.sstatic.net/Sites/s
tackoverflow/img/apple-touch-icon.png?v=c78bd457575a">
<link rel="search" type="application/opensearchdescription+xml" title="Stack
Overflow" href="/opensearch.xml">
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="stackoverflow.com"/>
<meta property="og:type" content="website" />
<meta property="og:image" itemprop="image primaryImageOfPage" content="https
://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded
" />
<meta name="twitter:title" property="og:title" itemprop="title name" content
="Getting Json data from text file in AngularJS" />
<meta name="twitter:description" property="og:description" itemprop="descrip
tion" content="I am new to AngularJS and trying to fetch JSON data from a text f
ile:
Here is my HTML:
&amp;lt;div ng-controller=&quot;customersController as custCont&quot;&amp;gt;
&amp;lt;ul&amp;gt;
&amp;lt;li ng-repeat=&quot;x in names&quot;&amp;..." />
<meta property="og:url" content="http://stackoverflow.com/questions/28387312
/getting-json-data-from-text-file-in-angularjs"/>
<link rel="canonical" href="http://stackoverflow.com/questions/28387312/gett
ing-json-data-from-text-file-in-angularjs" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.
js"></script>
<script src="https://cdn.sstatic.net/Js/stub.en.js?v=9a8031813907"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/s
tackoverflow/all.css?v=d9243128ba1c">
<link rel="alternate" type="application/atom+xml" title="Feed for qu
estion &#39;Getting Json data from text file in AngularJS&#39;" href="/feeds/que
stion/28387312">
<meta name="twitter:app:country" content="US" />
<meta name="twitter:app:name:iphone" content="Stack Exchange iOS" />
<meta name="twitter:app:id:iphone" content="871299723" />
<meta name="twitter:app:url:iphone" content="se-zaphod://stackoverfl
ow.com/questions/28387312/getting-json-data-from-text-file-in-angularjs" />
<meta name="twitter:app:name:ipad" content="Stack Exchange iOS" />
<meta name="twitter:app:id:ipad" content="871299723" />
<meta name="twitter:app:url:ipad" content="se-zaphod://stackoverflow
.com/questions/28387312/getting-json-data-from-text-file-in-angularjs" />
<meta name="twitter:app:name:googleplay" content="Stack Exchange And
roid">
<meta name="twitter:app:url:googleplay" content="http://stackoverflo
w.com/questions/28387312/getting-json-data-from-text-file-in-angularjs">
<meta name="twitter:app:id:googleplay" content="com.stackexchange.ma
rvin">
<script>
StackExchange.ready(function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.initSnippetRenderer();
});

StackExchange.using("postValidation", function () {
StackExchange.postValidation.initOnBlurAndSubmit($('#post-fo
rm'), 2, 'answer');
});

StackExchange.question.init({showAnswerHelp:true,totalCommentCou
nt:7,shownCommentCount:5,highlightColor:'#F4A83D',backgroundColor:'#FFF',questio
nId:28387312});
styleCode();
StackExchange.realtime.subscribeToQuestion('1', '28387312');
StackExchang
e.using("gps", function () { StackExchange.gps.trackOutboundClicks('#content', '
.post-text', true); });
});
</script>

<script>
StackExchange.init({"locale":"en","stackAuthUrl":"https://stackauth.com"
,"networkMetaHostname":"meta.stackexchange.com","serverTime":1487750098,"routeNa
me":"Questions/Show","site":{"name":"Stack Overflow","description":"Q&A for prof
essional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublic
Key":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","recaptchaAudioLang":"en","enabl
eNewTagCreationWarning":true,"insertSpaceAfterNameTabCompletion":false,"id":1,"e
nableInsertDocLinkDialog":true,"enableSocialMediaInSharePopup":true},"user":{"fk
ey":"32f537db8d8fdb741b40766678f99977","rep":0,"isAnonymous":true,"isAnonymousNe
tworkWide":true,"canSeeNewHeaderDesign":true,"ab":{"question_show_tweaks":{"v":"
altern_unansw_cta","g":1},"devstory_timeline_exp":{"v":"b","g":2}}},"events":{"p
ostType":{"question":1},"postEditionSection":{"title":1,"body":2,"tags":3}},"sto
ry":{"minCompleteBodyLength":75}}, {"site":{"allowImageUploads":true,"enableUser
Hovercards":true,"styleCode":true,"enableNewLinkInsertDialog":true,"enableImgurH
ttps":true,"forceHttpsImages":true},"comments":{},"userProfile":{"openGraphAPIKe
y":"58740831ad23540e00c58987"},"tags":{},"accounts":{"currentPasswordRequiredFor
ChangingStackIdPassword":true},"flags":{"allowRetractingFlags":true},"analytics"
:{"clientTimingsAbsoluteTimeout":30000,"clientTimingsDebounceTimeout":1000},"sni
ppets":{"snippetsEnabled":true,"renderDomain":"stacksnippets.net"},"markdown":{"
asteriskIntraWordEmphasis":true}});
StackExchange.using.setCacheBreakers({"js/prettify-full.en.js":"1d4fb582
14d2","js/moderator.en.js":"cbd9a328c047","js/full-anon.en.js":"2e47f3ab48cc","j
s/full.en.js":"fa16c4607c6f","js/wmd.en.js":"c174aa372284","js/third-party/jquer
y.autocomplete.min.js":"d3b8fa7fdf74","js/third-party/jquery.autocomplete.min.en
.js":"","js/mobile.en.js":"8c3bd5e12250","js/help.en.js":"a9d821110060","js/tage
ditor.en.js":"09862381cd28","js/tageditornew.en.js":"f156c9e5639f","js/inline-ta
g-editing.en.js":"2ddfa79492e7","js/revisions.en.js":"8f22ba768cac","js/review.e
n.js":"5d553af24c51","js/tagsuggestions.en.js":"b278f9a0b23b","js/post-validatio
n.en.js":"18263d352841","js/explore-qlist.en.js":"e71f14781288","js/events.en.js
":"9253044075ec","js/keyboard-shortcuts.en.js":"837880f5819d","js/external-edito
r.en.js":"cb487078c372","js/adops.en.js":"9a6a7812a212","js/external-editor.en.j
s":"cb487078c372","js/snippet-javascript.en.js":"11b9273bb631","js/snippet-javas
cript-codemirror.en.js":"e0babbb9bd6a"});
StackExchange.using("gps", function() {
StackExchange.gps.init(true);
});
</script>
<script>
StackExchange.ready(function () {
$('#nav-tour').click(function () {
StackExchange.using("gps", function() {
StackExchange.gps.track("aboutpage.click", { aboutclick_
location: "headermain" }, true);
});
});
});
</script>
</head>
<body class="question-page new-topbar">
<noscript><div id="noscript-padding"></div></noscript>
<script>(function () { var old = $.fn.contents; $.fn.contents = func
tion () { try { return old.apply(this, arguments); } catch (e) { return $([]); }
} })()</script>
<iframe id="adzerk-user-match" width="0" height="0" frameborder="0" scro
lling="no" onload="window.AUMIframeDone=true"
src="https://ssum-sec.casalemedia.com/usermatch?s=183712&amp;cb=
https%3A%2F%2Fengine.adzerk.net%2Fudb%2F22%2Fsync%2Fi.gif%3FpartnerId%3D1%26user
Id%3D"
style="display: none;" marginheight="0" marginwidth="0"></iframe
>
<div id="notify-container"></div>
<div id="custom-header"></div>
<header class="so-header js-so-header _fixed">
<div class="-container">
<div class="-main">
<a href="/" class="-logo " >
<span class="-img">Stack Overflow</span>
</a>
<nav class="navigation">
<ol class="-list">
<li class="-item _current">
<a id="nav-questions" href="/questions" class="-link js-gps-track"
data-gps-track="top_nav.click({is_current:true, location:2, destinat
ion:1})">Questions</a>
</li>
<li class="-item">
<a id="nav-jobs" href="/jobs?med=site-ui&amp;ref=jobs-tab" class="-link
js-gps-track"
data-gps-track="top_nav.click({is_current:false, location:2, destina
tion:6})">Jobs</a>
</li>
<li class="-item">
<a id="nav-docs" href="/documentation" class="-link js-gps-track"
data-gps-track="top_nav.click({is_current:false, location:2, destina
tion:7})">Documentation <small class='beta-badge'>beta</small></a>
</li>
<li class="-item">
<a id="nav-tags" href="/tags" class="-link js-gps-track"
data-gps-track="top_nav.click({is_current:false, location:2, destina
tion:2})">Tags</a>
</li>
<li class="-item">
<a id="nav-users" href="/users" class="-link js-gps-track"
data-gps-track="top_nav.click({is_current:false, location:2, destina
tion:3})">Users</a>
</li>
</ol>
</nav>
<form id="search" action="/search" method="get" class="searchbar" au
tocomplete="off">
<svg viewBox="0 0 18 18" width="18" height="18" role="icon"><pat
h fill-rule="evenodd" d="M12.864 11.32h-.813l-.288-.277A6.66 6.66 0 0 0 13.38 6.
69a6.69 6.69 0 1 0-6.69 6.69 6.66 6.66 0 0 0 4.354-1.617l.278.288v.813L16.467 18
18 16.467l-5.136-5.146zm-6.174 0a4.625 4.625 0 0 1-4.632-4.63A4.625 4.625 0 0 1
6.69 2.058a4.625 4.625 0 0 1 4.63 4.632 4.625 4.625 0 0 1-4.63 4.63z"/></svg>
<input name="q" type="text" placeholder="Search..." value="" tab
index="1" autocomplete="off" maxlength="240" class="f-input js-search-field" />
<button type="submit" class="btn js-search-submit">
<svg viewBox="0 0 18 18" width="18" height="18" role="icon">
<path fill-rule="evenodd" d="M12.864 11.32h-.813l-.288-.277A6.66 6.66 0 0 0 13.3
8 6.69a6.69 6.69 0 1 0-6.69 6.69 6.66 6.66 0 0 0 4.354-1.617l.278.288v.813L16.46
7 18 18 16.467l-5.136-5.146zm-6.174 0a4.625 4.625 0 0 1-4.632-4.63A4.625 4.625 0
0 1 6.69 2.058a4.625 4.625 0 0 1 4.63 4.632 4.625 4.625 0 0 1-4.63 4.63z"/></sv
g>
</button>
</form>
</div>

<div class="-actions">
<nav class="secondary-nav">
<div class="-dialog-container js-topbar-dialog-corral">

<div class="topbar-dialog siteSwitcher-dialog dno">


<div class="header">
<h3><a href="//stackoverflow.com">current community</a>
</h3>
</div>
<div class="modal-content current-site-container">
<ul class="current-site">
<li>
<div class="related-links">
<a href="http://chat.stackoverflow.com" class="js-gps-track"
data-gps-track="site_switcher.click({ item_type:6 })"
>chat</a>
</div>
<a href="//stackoverflow.com"
class="current-site-link site-link js-gps-track"
data-id="1"
data-gps-track="site_switcher.click({ item_type:3 })">
<div class="site-icon favicon favicon-stackoverflow" title="Stack Overfl
ow"></div>
Stack Overflow
</a>
</li>
<li class="related-site">
<div class="L-shaped-icon-container">
<span class="L-shaped-icon"></span>
</div>

<a href="http://meta.stackoverflow.com"
class="site-link js-gps-track"
data-id="552"
data-gps-track="site.switch({ target_site:552, item_type:3 }),site_switch
er.click({ item_type:4 })">
<div class="site-icon favicon favicon-stackoverflowmeta" title="Meta Sta
ck Overflow"></div>
Meta Stack Overflow
</a>
</li>
</ul>
</div>
<div class="header" id="your-communities-header">
<h3>
your communities </h3>
</div>
<div class="modal-content" id="your-communities-section">
<div class="call-to-login">
<a href="https://stackoverflow.com/users/signup?ssrc=site_switcher&amp;returnurl
=%2fusers%2fstory%2fcurrent&amp;amp;utm_source=stackoverflow.com&amp;amp;utm_med
ium=dev-story&amp;amp;utm_campaign=signup-redirect" class="login-link js-gps-tra
ck" data-gps-track="site_switcher.click({ item_type:10 })"
>Sign up</a> or <a href="https://stackoverflow.com/users/login?ssrc=site_switche
r&amp;returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f28387312%2fgetting-
json-data-from-text-file-in-angularjs" class="login-link js-gps-track" data-
gps-track="site_switcher.click({ item_type:11 })"
>log in</a> to customize your list.
</div>
</div>
<div class="header">
<h3><a href="//stackexchange.com/sites">more stack exchange communit
ies</a>
</h3>
<a href="http://stackoverflow.blog" class="fr">company blog</a>
</div>
<div class="modal-content">
<div class="child-content"></div>
</div>
</div>
<div class="topbar-dialog help-dialog js-help-dialog dno">
<div class="modal-content">
<ul>
<li>
<a href="/tour" class="js-gps-track" data-gps-track="hel
p_popup.click({ item_type:1 })">
Tour
<span class="item-summary">
Start here for a quick overview of the site
</span>
</a>
</li>
<li>
<a href="/help" class="js-gps-track" data-gps-track="help_po
pup.click({ item_type:4 })">
Help Center
<span class="item-summary">
Detailed answers to any questions you might have
</span>
</a>
</li>
<li>
<a href="//meta.stackoverflow.com" class="js-gps-tra
ck" data-gps-track="help_popup.click({ item_type:2 })">
Meta
<span class="item-summary">
Discuss the workings and policies of this si
te
</span>
</a>
</li>
<li>
<a href="http://stackoverflow.com/company/about" cla
ss="js-gps-track" data-gps-track="help_popup.click({ item_type:6 })">
About Us
<span class="item-summary">
Learn more about Stack Overflow the company
</span>
</a>
</li>
<li>
<a href="https://www.stackoverflowbusiness.com/?ref=
topbar_help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:7
})">
Business
<span class="item-summary">
Learn more about hiring developers or postin
g ads with us
</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<ol class="-list">
<li class="-item"><a href="#" class="-link js-help-button" title="Help Cente
r and other resources">
<svg viewBox="0 0 18 18" width="18" height="18" role="icon"><path fill-r
ule="evenodd" d="M9 0a9 9 0 1 0 .001 18.001A9 9 0 0 0 9 0zm.812 13.126c-.02.716-
.55 1.157-1.238 1.137-.659-.02-1.177-.49-1.157-1.209.02-.715.566-1.17 1.225-1.15
.691.021 1.194.507 1.17 1.222zm1.956-5.114c-.168.237-.546.542-1.02.912l-.527.361
c-.257.197-.417.43-.502.695-.044.141-.076.507-.084.752-.004.048-.032.156-.181.15
6H7.883c-.165 0-.185-.096-.18-.144.023-.667.12-1.218.397-1.66.374-.594 1.426-1.2
21 1.426-1.221.161-.12.286-.25.382-.39.177-.24.321-.51.321-.8 0-.333-.08-.65-.29
3-.915-.249-.31-.518-.458-1.036-.458-.51 0-.808.257-1.021.594-.213.338-.177.735-
.177 1.097H5.746c0-1.366.357-2.238 1.112-2.752.51-.35 1.162-.502 1.921-.502.996
0 1.788.184 2.487.715.647.49.988 1.181.988 2.113 0 .575-.2 1.057-.486 1.447z" />
</svg>
</a></li>
<li class="-item">
<a href="//stackexchange.com" class="-link js-site-switcher-button js-gp
s-track" data-gps-track="site_switcher.show" title="A list of all 165 Stack Exch
ange sites">
<svg viewBox="0 0 18 19" width="18" height="19" role="icon"><path fi
ll-rule="evenodd" d="M0 14a2 2 0 0 0 2 2h10v3l3-3h1a2 2 0 0 0 2-2v-2H0v2zM16 0H2
a2 2 0 0 0-2 2v2h18V2a2 2 0 0 0-2-2zM0 6h18v4H0V6z" /></svg>
</a>
</li>

</ol>
</nav>
<div class="-ctas">
<a href="https://stackoverflow.com/users/login?ssrc=head&ret
urnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f28387312%2fgetting-json-data
-from-text-file-in-angularjs" class="login-link btn-clear" rel="nofollow">Log In
</a>
<a href="https://stackoverflow.com/users/signup?ssrc=hea
d&returnurl=%2fusers%2fstory%2fcurrent&amp;utm_source=stackoverflow.com&amp;utm_
medium=dev-story&amp;utm_campaign=signup-redirect" class="login-link btn" rel="n
ofollow">Sign Up</a>
</div>
</div>
</div>
</header>
<script>
StackExchange.ready(function () { StackExchange.topbar.init(); });
StackExchange.scrollPadding.setPaddingTop(60, 10); </script>
<div class="container">

<div id="content" class="snippet-hidden">

<div itemscope itemtype="http://schema.org/Question">


<link itemprop="image" href="https://cdn.sstatic.net/Sites/stackoverflow/img
/apple-touch-icon.png?v=c78bd457575a">
<div id="herobox" class="alternate">
<div class="test"></div>
<div id="close">
<a title="click to minimize"><span>x</span> Dismiss</a>
</div>
<div class="content">
<b>Join the Stack Overflow Community</b>
<div class="separator"></div>
<div class="blurb">
Stack Overflow is a community of 6.7 million programmers, just like
you, helping each other.
<br />
Join them; it only takes a minute: <br />
</div>
<a href="/users/signup?ssrc=hero&amp;returnurl=%2fusers%2fstory%2fcurren
t&amp;amp;utm_source=stackoverflow.com&amp;amp;utm_medium=dev-story&amp;amp;utm_
campaign=signup-redirect" id="tell-me-more" class="button">Sign up</a>
</div>
</div>
<script>
StackExchange.ready(function () {
var location = 0;
if ($("body").hasClass("questions-page")) {
location = 1;;
} else if ($("body").hasClass("question-page")) {
location = 1;;
} else if ($("body").hasClass("faq-page")) {
location = 5;;
} else if ($("body").hasClass("home-page")) {
location = 3;;
}
$('#tell-me-more').click(function () {
StackExchange.using("gps", function () {
StackExchange.gps.track("hero.action", { hero_action_type: 'cta'
, location: location }, true);
});
});
$('#herobox #close').click(function () {
StackExchange.using("gps", function () {
StackExchange.gps.track("hero.action", { hero_action_type: "mini
mize", location: location }, true);
});
$.cookie("hero", "mini", { path: "/", expires: 365 });
$.ajax({
url: "/hero-mini",
success: function (data) {
$("#herobox").fadeOut("fast", function () {
$("#herobox").replaceWith(data);
$("#herobox-mini").fadeIn("fast");
});
}
});
return false;
});
});
</script> <div id="question-header">
<h1 itemprop="name"><a href="/questions/28387312/getting-json-da
ta-from-text-file-in-angularjs" class="question-hyperlink">Getting Json data fro
m text file in AngularJS</a></h1>

<div class="aside-cta">
<a href="/questions/ask" class="btn-outlined">Ask Question</a>
</div>
</div>
<div id="mainbar">

<div class="question" data-questionid="28387312" id="question">


<script>
var ados = ados || {}; ados.run = ados.run || [];
ados.run.push(function () { ados_add_placement(22,8277,"adzerk59
6306886",4).setZone(43); });
</script>
<div class="everyonelovesstackoverflow" id="adzerk596306886"></div>
<table>
<tr>
<td class="votecell">

<div class="vote">
<input type="hidden" name="_id_" value="28387312">
<a class="vote-up-off" title="This question shows research effort; it is
useful and clear">up vote</a>
<span itemprop="upvoteCount" class="vote-count-post ">1</span>
<a class="vote-down-off" title="This question does not show any research
effort; it is unclear or not useful">down vote</a>
<a class="star-off" href="#">favorite</a>
<div class="favoritecount"><b>1</b></div>

</div>
</td>
<td class="postcell">
<div>
<div class="post-text" itemprop="text">
<p>I am new to AngularJS and trying to fetch JSON data from a text file:</p>
<p>Here is my HTML:</p>
<pre><code>&lt;div ng-controller="customersController as custCont"&gt;
&lt;ul&gt;
&lt;li ng-repeat="x in names"&gt;
{{ x.Name + ', ' + x.Country }}
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>
<p>Whereas my controller is as given below:</p>
<pre><code>app.controller( "customersController", function( $scope, $window) {
$http({
url: 'test.txt',
dataType: 'json',
method: 'POST',
data: '',
headers: {
"Content-Type": "application/json"
}
}).success(function(response){
$scope.names = response;
}).error(function(error){
$scope.names = 'error';
});
</code></pre>
<p>This doesn't show anything. Now if I replace the above http request with test
.txt data assigned to $scope.names then it starts working: I mean, something lik
e this:</p>
<pre><code>$scope.names = [
{
"Name" : "Alfreds Futterkiste",
"City" : "Berlin",
"Country" : "Germany"
},
{
"Name" : "Berglunds snabbkp",
"City" : "Lule",
"Country" : "Sweden"
},
{
"Name" : "Centro comercial Moctezuma",
"City" : "Mxico D.F.",
"Country" : "Mexico"
},
{
"Name" : "Ernst Handel",
"City" : "Graz",
"Country" : "Austria"
},
{
"Name" : "FISSA Fabrica Inter. Salchichas S.A.",
"City" : "Madrid",
"Country" : "Spain"
},
{
"Name" : "Galera del gastrnomo",
"City" : "Barcelona",
"Country" : "Spain"
},
{
"Name" : "Island Trading",
"City" : "Cowes",
"Country" : "UK"
},
{
"Name" : "Kniglich Essen",
"City" : "Brandenburg",
"Country" : "Germany"
},
{
"Name" : "Laughing Bacchus Wine Cellars",
"City" : "Vancouver",
"Country" : "Canada"
},
{
"Name" : "Magazzini Alimentari Riuniti",
"City" : "Bergamo",
"Country" : "Italy"
},
{
"Name" : "North/South",
"City" : "London",
"Country" : "UK"
},
{
"Name" : "Paris spcialits",
"City" : "Paris",
"Country" : "France"
},
{
"Name" : "Rattlesnake Canyon Grocery",
"City" : "Albuquerque",
"Country" : "USA"
},
{
"Name" : "Simons bistro",
"City" : "Kbenhavn",
"Country" : "Denmark"
},
{
"Name" : "The Big Cheese",
"City" : "Portland",
"Country" : "USA"
},
{
"Name" : "Vaffeljernet",
"City" : "rhus",
"Country" : "Denmark"
},
{
"Name" : "Wolski Zajazd",
"City" : "Warszawa",
"Country" : "Poland"
}
];
</code></pre>
<p>The text file obviously contains all the data except the first row (i.e.
<code>$scope.names = [</code> and the last semicolon<code>;</code></p>
<p>That means the $http request to test.txt is failing which is in the same fold
er as html and js files. Anyone can please help.</p>
<p>Thanks.</p>
<p><strong>======= UPDATE ========</strong></p>
<p>There were two issues. </p>
<ol>
<li>I missed $http parameter in my controller function.</li>
<li>I was using "POST", which I replaced with "GET" to make it work</li>
</ol>
<p>It now work from local machine as well as remote web server.</p>
<p>Thanks for all your help.</p>
</div>
<div class="post-taglist">
<a href="/questions/tagged/javascript" class="post-tag" title="show ques
tions tagged &#39;javascript&#39;" rel="tag">javascript</a> <a href="/questions/
tagged/json" class="post-tag" title="show questions tagged &#39;json&#39;" rel="
tag">json</a> <a href="/questions/tagged/angularjs" class="post-tag" title="show
questions tagged &#39;angularjs&#39;" rel="tag">angularjs</a> <a href="/questio
ns/tagged/text" class="post-tag" title="show questions tagged &#39;text&#39;" re
l="tag">text</a> <a href="/questions/tagged/xmlhttprequest" class="post-tag" tit
le="show questions tagged &#39;xmlhttprequest&#39;" rel="tag">xmlhttprequest</a>
</div>
<table class="fw">
<tr>
<td class="vt">
<div class="post-menu"><a href="/q/28387312" title="short permalink to this ques
tion" class="short-link" id="link-post-28387312">share</a><span class="lsep">|</
span><a href="/posts/28387312/edit" class="suggest-edit-post" title="">improve t
his question</a></div>
</td>
<td align="right" class="post-signature">
<div class="user-info ">
<div class="user-action-time">
<a href="/posts/28387312/revisions" title="show all edits to this post">
edited <span title="2015-02-07 21:34:55Z" class="relativetime">Feb 7 '15 at 21:3
4</span></a>
</div>
<div class="user-gravatar32">
</div>
<div class="user-details">
<div class="-flair">
</div>
</div>
</div> </td>
<td class="post-signature owner">
<div class="user-info ">
<div class="user-action-time">
asked <span title="2015-02-07 20:59:49Z" class="relativetime">Feb 7 '15
at 20:59</span>
</div>
<div class="user-gravatar32">
<a href="/users/3103244/anjum"><div class="gravatar-wrapper-32"><img src
="https://www.gravatar.com/avatar/82f2464fd0ab8abec849aeddc54714a0?s=32&amp;d=id
enticon&amp;r=PG&amp;f=1" alt="" width="32" height="32"></div></a>
</div>
<div class="user-details">
<a href="/users/3103244/anjum">Anjum</a>
<div class="-flair">
<span class="reputation-score" title="reputation score " dir="ltr">1
,003</span><span title="14 silver badges"><span class="badge2"></span><span clas
s="badgecount">14</span></span><span title="34 bronze badges"><span class="badge
3"></span><span class="badgecount">34</span></span>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="votecell"></td>
<td>
<div id="comments-28387312" class="comments ">
<table>
<tbody data-remaining-comments-count="2"
data-canpost="false"
data-cansee="true"
data-comments-unavailable="false"
data-addlink-disabled="true">

<tr id="comment-45112260" class="comment ">


<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">what is being displayed when you cons
ole.log(typeof response) in your callback? is it a string or an object?</span>
&ndash;&nbsp;<a href="/users/840524/nanndoj"
title="2,978 reputation"
class="comment-user">nanndoj</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
05:16Z" class="relativetime-clean">Feb 7 '15 at 21:05</span></span>
<span class="edited-yes" title="this comment was edited
2 times"></span>
</di
v>
</td>
</tr>
<tr id="comment-45112370" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Is it compulsory it will be a text fi
le not a json file ?</span>
&ndash;&nbsp;<a href="/users/1632286/squiroid"
title="9,256 reputation"
class="comment-user">squiroid</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
11:12Z" class="relativetime-clean">Feb 7 '15 at 21:11</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45112404" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">The file format is json. Only its ext
ension is .txt, plus I would also need to pull some text files as well.</span>
&ndash;&nbsp;<a href="/users/3103244/anjum"
title="1,003 reputation"
class="comment-user owner">Anjum</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
12:52Z" class="relativetime-clean">Feb 7 '15 at 21:12</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45112419" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">@nanndoj I don&#39;t think its gettin
g into any of those success() or error () functions</span>
&ndash;&nbsp;<a href="/users/3103244/anjum"
title="1,003 reputation"
class="comment-user owner">Anjum</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
13:40Z" class="relativetime-clean">Feb 7 '15 at 21:13</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45112482" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Just to be clear, your json in that t
ext file is an array?</span>
&ndash;&nbsp;<a href="/users/726965/mindparse"
title="2,390 reputation"
class="comment-user">mindparse</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
16:47Z" class="relativetime-clean">Feb 7 '15 at 21:16</span></span>
</di
v>
</td>
</tr>
</tbody>
</table>
</div>
<div id="comments-link-28387312" data-rep=50 data-anon=true>
<a class="js-add-link comments-link dno"
title="Use comments to ask for more information or suggest im
provements. Avoid answering questions in comments."
></a><span class="js-link-separator dno">&nbsp;|&nbsp;</span>
<a class="js-show-link comments-link " title="expand to show all com
ments on this post" href=# onclick="">show <b>2</b> more comments</a>
</div>
</td>
</tr> </table>
</div>
<div id="answers">
<a name="tab-top"></a>
<div id="answers-header">
<div class="subheader answers-subheader"
>
<h2>
1 Answer
<span style="display:none;" itemprop="answerCoun
t">1</span>
</h2>
<div>
<div id="tabs">
<a href="/questions/28387312/getting-json-data-from-text-file-in-angular
js?answertab=active#tab-top" data-nav-xhref="" title="Answers with the latest ac
tivity first" data-value="active" data-shortcut="A">
active</a>
<a href="/questions/28387312/getting-json-data-from-text-file-in-angular
js?answertab=oldest#tab-top" data-nav-xhref="" title="Answers in the order they
were provided" data-value="oldest" data-shortcut="O">
oldest</a>
<a class="youarehere" href="/questions/28387312/getting-json-data-from-t
ext-file-in-angularjs?answertab=votes#tab-top" data-nav-xhref="" title="Answers
with the highest score first" data-value="votes" data-shortcut="V">
votes</a>
</div>
</div>
</div>
</div>

<a name="28387519"></a>
<div id="answer-28387519" class="answer accepted-answer" data-answerid="28387519
" itemscope itemtype="http://schema.org/Answer" itemprop="acceptedAnswer">
<table>
<tr>
<td class="votecell">

<div class="vote">
<input type="hidden" name="_id_" value="28387519">
<a class="vote-up-off" title="This answer is useful">up vote</a>
<span itemprop="upvoteCount" class="vote-count-post ">4</span>
<a class="vote-down-off" title="This answer is not useful">down vote</a>

<span class="vote-accepted-on load-accepted-answer-date" title="loading


when this answer was accepted...">accepted</span>
</div>
</td>

<td class="answercell">
<div class="post-text" itemprop="text">
<p>You are missing to define $http as a parameter</p>
<pre><code>app.controller( "customersController", function( $scope, $window, $ht
tp) {
</code></pre>
<p>Also make sure you are testing in a web server. You cann't make ajax request
from file:// protocol</p>
<p>Also change your request from POST to GET and it should work fine. <a href="h
ttp://plnkr.co/edit/Lh9sYyTRjWziN1ZEg29t?p=preview" rel="nofollow">Here is a Pun
klr</a></p>
<pre><code> method: 'GET',
</code></pre>
</div>
<table class="fw">
<tr>
<td class="vt">
<div class="post-menu"><a href="/a/28387519" title="short permalink to this answ
er" class="short-link" id="link-post-28387519">share</a><span class="lsep">|</sp
an><a href="/posts/28387519/edit" class="suggest-edit-post" title="">improve thi
s answer</a></div> </td>
<td align="right" class="post-signature">
<div class="user-info ">
<div class="user-action-time">
<a href="/posts/28387519/revisions" title="show all edits to this post">
edited <span title="2015-02-07 21:36:07Z" class="relativetime">Feb 7 '15 at 21:3
6</span></a>
</div>
<div class="user-gravatar32">
</div>
<div class="user-details">
<div class="-flair">
</div>
</div>
</div> </td>

<td align="right" class="post-signature">

<div class="user-info user-hover">


<div class="user-action-time">
answered <span title="2015-02-07 21:20:00Z" class="relativetime">Feb 7 '
15 at 21:20</span>
</div>
<div class="user-gravatar32">
<a href="/users/840524/nanndoj"><div class="gravatar-wrapper-32"><img sr
c="https://i.stack.imgur.com/9yVSh.jpg?s=32&amp;g=1" alt="" width="32" height="3
2"></div></a>
</div>
<div class="user-details">
<a href="/users/840524/nanndoj">nanndoj</a>
<div class="-flair">
<span class="reputation-score" title="reputation score " dir="ltr">2
,978</span><span title="1 gold badge"><span class="badge1"></span><span class="b
adgecount">1</span></span><span title="12 silver badges"><span class="badge2"></
span><span class="badgecount">12</span></span><span title="25 bronze badges"><sp
an class="badge3"></span><span class="badgecount">25</span></span>
</div>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="votecell"></td>
<td>
<div id="comments-28387519" class="comments ">
<table>
<tbody data-remaining-comments-count="1"
data-canpost="false"
data-cansee="true"
data-comments-unavailable="false"
data-addlink-disabled="true">

<tr id="comment-45112652" class="comment ">


<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Thanks. Yes I already noticed and cor
rected that. Calling from Server also gives the same error.</span>
&ndash;&nbsp;<a href="/users/3103244/anjum"
title="1,003 reputation"
class="comment-user owner">Anjum</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
25:25Z" class="relativetime-clean">Feb 7 '15 at 21:25</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45112879" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Updated my answer adding a working pu
nkler</span>
&ndash;&nbsp;<a href="/users/840524/nanndoj"
title="2,978 reputation"
class="comment-user">nanndoj</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
36:30Z" class="relativetime-clean">Feb 7 '15 at 21:36</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45112887" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">I am not using file:// protocol. But
I am able to GET it from my local machine by simply using test.txt as URL.</span
>
&ndash;&nbsp;<a href="/users/3103244/anjum"
title="1,003 reputation"
class="comment-user owner">Anjum</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
36:52Z" class="relativetime-clean">Feb 7 '15 at 21:36</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45112911" class="comment ">
<td>
<table>
<tbody>
<tr>
<td class=" comment-score">
&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">I have already done that. Thanks anyw
ay.</span>
&ndash;&nbsp;<a href="/users/3103244/anjum"
title="1,003 reputation"
class="comment-user owner">Anjum</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
38:15Z" class="relativetime-clean">Feb 7 '15 at 21:38</span></span>
</di
v>
</td>
</tr>
<tr id="comment-45113042" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
<span title="number of &#39;useful comment&#39;
votes received"
class="cool">1</span>
</td>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Yeah. But you have to change the &quo
t;Content-Type&quot;: &quot;application/json&quot; to the one you want</span>
&ndash;&nbsp;<a href="/users/840524/nanndoj"
title="2,978 reputation"
class="comment-user">nanndoj</a>
<span class="comment-date" dir="ltr"><span title="2015-02-07 21:
44:04Z" class="relativetime-clean">Feb 7 '15 at 21:44</span></span>
</di
v>
</td>
</tr>
</tbody>
</table>
</div>
<div id="comments-link-28387519" data-rep=50 data-anon=true>
<a class="js-add-link comments-link dno"
title="Use comments to ask for more information or suggest im
provements. Avoid comments like +1 or thanks ."
></a><span class="js-link-separator dno">&nbsp;|&nbsp;</span>
<a class="js-show-link comments-link " title="expand to show all com
ments on this post" href=# onclick="">show <b>1</b> more comment</a>
</div>
</td>
</tr> </table>
</div>
<a name=
'new-answer'></a>
<form id="post-form" action="/qu
estions/28387312/answer/submit" method="post" class="post-form">
<input type="hidden" id="pos
t-id" value="28387312" />
<input type="hidden" id="qualityBanWarningShown" nam
e="qualityBanWarningShown" value="false" />
<input type="hidden" name="referrer" value="https://
www.google.co.in/"/>
<h2 class="space">Your A
nswer</h2>

<script>
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
</script>

<script>
StackExchange.ready(function() {
initTagRenderer("".split(" "), "".split(" "));
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});

}
});
</script>

<div id="post-editor" class="post-editor js-post-editor">


<div style="position: relative;">
<div class="wmd-container">
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="wmd-input" name="post-text" cols="92
" rows="15" tabindex="101" data-min-length=""></textarea>
</div>
</div>
<div class="fl" style="margin-top: 8px; height:24px;">&nbsp;</div>
<div id="draft-saved" class="draft-saved community-option fl" style="margin-
top: 8px; height:24px; display:none;">draft saved</div>
<div id="draft-discarded" class="draft-discarded community-option fl" style=
"margin-top: 8px; height:24px; display:none;">draft discarded</div>

<div id="wmd-preview" class="wmd-preview"></div>


<div></div>
<div class="edit-block">
<input id="fkey" name="fkey" type="hidden" value="32f537db8d8fdb741b4076
6678f99977">
<input id="author" name="author" type="text">
</div>

</div>
<div style="position: re
lative;">
<div
class="form-item dno new-post-login">
<div class="new-login-form">
<div class="new-login-left">
<h3>Sign up or <a id="login-link" href="/users/login?ssr
c=question_page&returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f28387312%
2fgetting-json-data-from-text-file-in-angularjs%23new-answer">log in</a></h3>
<script>
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-l
ink');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window
.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height(
);
if ((docViewTop < elemTop) && (docViewBo
ttom > elemBottom)) {
StackExchange.using('gps', function(
) { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_p
age' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
</script>
<div class="preferred-login google-login">
<p><span class="icon"></span><span>Sign up using Goo
gle</span></p>
</div>
<div class="preferred-login facebook-login">
<p><span class="icon"></span><span>Sign up using Fac
ebook</span></p>
</div>
<div class="preferred-login stackexchange-login">
<p><span class="icon"></span><span>Sign up using Ema
il and Password</span></p>
</div>
</div>
<input type="hidden" name="manual-openid" class="manual-open
id" />
<input type="hidden" name="use-facebook" class="use-facebook
" value="false" />
<input type="hidden" name="use-google" class="use-google" va
lue="false" />
<input type="button" class="submit-openid" value="Submit" st
yle="display:none" />
<div class="new-login-right">
<h3>Post as a guest</h3>
<div class="form-item">
<table>
<tr>
<td class="vm">
<div>
<label for="display-name">Name</label>
<input id="display-name" name="display-name" type="text" siz
e="30" maxlength="30" value="" tabindex="105">
</div>
<div>
<label for="m-address">Email</label>
<input id="m-address" name="m-address" type="email" size="30
" maxlength="100" value="" tabindex="106" placeholder="required, but never shown
" />
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<script>
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'h
ttp%3a%2f%2fstackoverflow.com%2fquestions%2f28387312%2fgetting-json-data-from-te
xt-file-in-angularjs%23new-answer', 'question_page');
}
);
</script>
<noscript>
<h3>Post as a guest</h3>
<div class="form-item">
<table>
<tr>
<td class="vm">
<div>
<label for="display-name">Name</label>
<input id="display-name" name="display-name" type="text" siz
e="30" maxlength="30" value="" tabindex="105">
</div>
<div>
<label for="m-address">Email</label>
<input id="m-address" name="m-address" type="email" size="30
" maxlength="100" value="" tabindex="106" placeholder="required, but never shown
" />
</div>
</td>
</tr>
</table>
</div>
</noscript>
</div>

<div class="form-submit cbt">


<input i
d="submit-button" type="submit" value="Post Your Answer" tabindex="110">
<a href=
"#" class="btn-clear discard-answer dno">discard</a>
<p class="privacy-policy-agreement">
By posting your answer, you agree to the <a href='http://stackexchange.com/legal
/privacy-policy' name='privacy' target='_blank'>privacy policy</a> and <a href='
http://stackexchange.com/legal/terms-of-service' name='tos' target='_blank'>term
s of service</a>.</p>
<input type="hidden" name="legalLinksShown" value="1" />
</div>
</form>

<h2 class="bottom-notice" data-l


oc="1">
Not the answer you&#39;re looking for?
Browse other questions tagged <a href="/questions/tagged/javascript" class="post
-tag" title="show questions tagged &#39;javascript&#39;" rel="tag">javascript</a
> <a href="/questions/tagged/json" class="post-tag" title="show questions tagged
&#39;json&#39;" rel="tag">json</a> <a href="/questions/tagged/angularjs" class=
"post-tag" title="show questions tagged &#39;angularjs&#39;" rel="tag">angularjs
</a> <a href="/questions/tagged/text" class="post-tag" title="show questions tag
ged &#39;text&#39;" rel="tag">text</a> <a href="/questions/tagged/xmlhttprequest
" class="post-tag" title="show questions tagged &#39;xmlhttprequest&#39;" rel="t
ag">xmlhttprequest</a> or <a href="/questions/ask">ask your own question</a>.
</h2>
</div>
</div>
<div id="sidebar" class="show-votes">
<div class="module question-
stats">
<table id="qinfo">
<tr>
<td>
<p class="label-key">asked</p>
</td>
<td style="padding-left: 10px">
<p class="label-key" title="2015-02-
07 20:59:49Z"><b>2 years ago</b></p>
</td>
</tr>
<tr>
<td>
<p class="label-key">viewed</p>
</td>
<td style="padding-left: 10px">
<p class="label-key">
<b>8491 times</b>
</p>
</td>
</tr>
<tr>
<td>
<p class="label-key">active</p>
</td>
<td style="padding-left: 10px">
<p class="label-key"><b><a href=
"?lastactivity" class="lastactivity-link" title="2015-02-07 21:36:07Z">2 years a
go</a></b></p>
</td>
</tr>
</table>
</div>
<div class="module community-bulletin" data-tracker="cb=
1">
<div class="related">
<div class="bulletin-title">
Blog
</div>
<hr />
<div class="spacer">
<div class="bulletin-item-type">
<a href="http://stackoverflow.blog/2017/02/Stack-Overflow-Podcas
t-101-Matt-Mullenweg-on-Open-Source-Blogs-and-Beyonce/" class="question-hyperlin
k">
<div class="favicon favicon-stackexchangemeta" title="Meta Stack Exchange"></div
> </a>
</div>
<div class="bulletin-item-content">
<a href="http://stackoverflow.blog/2017/02/Stack-Overflow-Po
dcast-101-Matt-Mullenweg-on-Open-Source-Blogs-and-Beyonce/" class="question-hype
rlink">Stack Overflow Podcast #101 - Matt Mullenweg on Open Source, Blogs, and B
eyonc&#233;</a>
</div>
<br class="cbt" />
</div>
</div>
</div>
<script>
var ados = ados || {}; ados.run = ados.run || [];
ados.run.push(function () { ados_add_placement(22,8277,"adzerk73
9399503",[5,17,2221]).setZone(45); });
</script>
<div class="everyonelovesstackoverflow" id="adzerk739399503"></div>
<div id="hireme"></div>
<script>
window.clc_request = 'ApzvCRn4WtQIAAAAAPAnsQECAAAAAgAAAABCAAAAfGphdmFzY3JpcHR8an
Nvbnxhbmd1bGFyanN8dGV4dHx4bWxodHRwcmVxdWVzdHx4LXBlcnNvbmEtZnJvbnRlbmR8AED17JVmwe
onAFw';
;(function(n){var t,u,r,i;try{if(typeof[].indexOf!="function")return;if(window.a
ttachEvent&&!window.addEventListener)return;if(n.allowed[0]!=="*"&&n.allowed.ind
exOf(location.hostname)===-1)return;if(t=window,t.clc=t.clc||{},u=t.clc_request|
|t.clcfl_request,u||console.warn("clc_request missing"),t.clc.init=t.clc.init||[
],t.clc.init.push(function(n){return n.load()}),t.clc.options){for(r in t.clc.op
tions)n[r]=t.clc.options[r];t.clc.options=n}else t.clc.options=n;i=document.crea
teElement("script");i.async=!0;i.src=n.lib;document.body.appendChild(i)}catch(f)
{console.error("[clc] Error in loader:",f)}}).call(null, {"azw":true,"kt":2000,"
tto":true,"autoload":true,"d":{"sb":["hireme","clc-sb"],"tlb":["careers1","clc-t
lb"],"mlb":["careers3","clc-mlb"]},"allowed":["stackoverflow.com","serverfault.c
om","blog.codinghorror.com","talent.stackoverflow.com"],"h":"clc.stackoverflow.c
om","u":"https://clc.stackoverflow.com/markup.js","lib":"https://cdn.sstatic.net
/clc/clc.min.js?v=bd570ea4a858"}); </script>

<div class="module sidebar-related">


<h4 id="h-related">Related</h4>
<div class="related js-gps-related-questions" data-tracker="
rq=1">
<div class="spacer"><a href="/q/1643227" title="Vote sco
re (upvotes - downvotes)"><div class="answer-votes answered-accepted extra-large
">1567</div></a><a href="/questions/1643227/get-selected-text-from-a-drop-down-l
ist-select-box-using-jquery" class="question-hyperlink">Get selected text from a
drop-down list (select box) using jQuery</a></div><div class="spacer"><a href="
/q/7172784" title="Vote score (upvotes - downvotes)"><div class="answer-votes an
swered-accepted extra-large">1274</div></a><a href="/questions/7172784/how-to-po
st-json-data-with-curl-from-terminal-commandline-to-test-spring-rest" class="que
stion-hyperlink">How to POST JSON data with Curl from Terminal/Commandline to Te
st Spring REST?</a></div><div class="spacer"><a href="/q/9682092" title="Vote sc
ore (upvotes - downvotes)"><div class="answer-votes answered-accepted extra-larg
e">1511</div></a><a href="/questions/9682092/how-does-data-binding-work-in-angul
arjs" class="question-hyperlink">How does data binding work in AngularJS?</a></d
iv><div class="spacer"><a href="/q/16956810" title="Vote score (upvotes - downvo
tes)"><div class="answer-votes answered-accepted extra-large">2039</div></a><a h
ref="/questions/16956810/how-to-find-all-files-containing-specific-text-on-linux
" class="question-hyperlink">How to find all files containing specific text on L
inux?</a></div><div class="spacer"><a href="/q/30146831" title="Vote score (upvo
tes - downvotes)"><div class="answer-votes default">1</div></a><a href="/questio
ns/30146831/adding-into-json-object-with-angularjs" class="question-hyperlink">A
dding into json object with AngularJS</a></div><div class="spacer"><a href="/q/3
1816187" title="Vote score (upvotes - downvotes)"><div class="answer-votes answe
red-accepted default">1</div></a><a href="/questions/31816187/data-is-not-get-fr
om-json-file-using-angularjs" class="question-hyperlink">Data is not get from js
on file using angularjs</a></div><div class="spacer"><a href="/q/32522826" title
="Vote score (upvotes - downvotes)"><div class="answer-votes default">1</div></a
><a href="/questions/32522826/angularjs-http-service-can-not-load-ucs-2-json" cl
ass="question-hyperlink">AngularJS $http-service can not load UCS-2 JSON</a></di
v><div class="spacer"><a href="/q/36042113" title="Vote score (upvotes - downvot
es)"><div class="answer-votes answered-accepted default">1</div></a><a href="/qu
estions/36042113/angularjs-getting-data-from-json-local-file" class="question-hy
perlink">AngularJS getting data from JSON local file</a></div><div class="spacer
"><a href="/q/37680307" title="Vote score (upvotes - downvotes)"><div class="ans
wer-votes answered-accepted default">0</div></a><a href="/questions/37680307/ang
ularjs-json-getting-all-the-time-on-details-page" class="question-hyperlink">Ang
ularJS JSON getting all the time on details page</a></div><div class="spacer"><a
href="/q/37829074" title="Vote score (upvotes - downvotes)"><div class="answer-
votes answered-accepted default">0</div></a><a href="/questions/37829074/cordova
-angularjs-factory-get-json-xmlhttprequest" class="question-hyperlink">Cordova/A
ngularJS factory GET JSON XMLHttpRequest</a></div>
</div>
</div>
<div id="hot-network-questions" class="module">
<h4>
<a href="//stackexchange.com/questions?tab=hot"
class="js-gps-track"
data-gps-track="posts_hot_network.click({ item_type:1, location:11 })
">
Hot Network Questions
</a>
</h4>
<ul>
<li >
<div class="favicon favicon-travel" title="Travel Stack Exchange
"></div><a href="http://travel.stackexchange.com/questions/88513/what-does-cwop-
mean-on-visa-cancelled-stamp" class="js-gps-track" data-gps-track="site.switch({
item_type:11, target_site:273 }); posts_hot_network.click({ item_type:2, locati
on:11 })">
What does CWOP mean on visa cancelled stamp?
</a>
</li>
<li >
<div class="favicon favicon-stats" title="Cross Validated"></div
><a href="http://stats.stackexchange.com/questions/263324/how-can-the-regression
-error-term-ever-be-correlated-with-the-explanatory-variab" class="js-gps-track"
data-gps-track="site.switch({ item_type:11, target_site:65 }); posts_hot_networ
k.click({ item_type:2, location:11 })">
How can the regression error term ever be correlated with th
e explanatory variables?
</a>
</li>
<li >
<div class="favicon favicon-latin" title="Latin Language Stack E
xchange"></div><a href="http://latin.stackexchange.com/questions/2703/why-is-omn
e-ablative-in-catullus-1" class="js-gps-track" data-gps-track="site.switch({ ite
m_type:11, target_site:644 }); posts_hot_network.click({ item_type:2, location:1
1 })">
Why is omne ablative in catullus 1?
</a>
</li>
<li >
<div class="favicon favicon-music" title="Music: Practice &amp;
Theory Stack Exchange"></div><a href="http://music.stackexchange.com/questions/5
3658/bass-line-melodies" class="js-gps-track" data-gps-track="site.switch({ item
_type:11, target_site:240 }); posts_hot_network.click({ item_type:2, location:11
})">
Bass line melodies
</a>
</li>
<li >
<div class="favicon favicon-codegolf" title="Programming Puzzles
&amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.co
m/questions/110648/fewest-distinct-characters-for-turing-completeness" class="js
-gps-track" data-gps-track="site.switch({ item_type:11, target_site:200 }); post
s_hot_network.click({ item_type:2, location:11 })">
Fewest (distinct) characters for Turing Completeness
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-math" title="Mathematics Stack Excha
nge"></div><a href="http://math.stackexchange.com/questions/2155108/is-most-of-m
athematics-not-dealing-with-sets" class="js-gps-track" data-gps-track="site.swit
ch({ item_type:11, target_site:69 }); posts_hot_network.click({ item_type:2, loc
ation:11 })">
Is most of mathematics *not* dealing with sets?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-mathoverflow" title="MathOverflow"><
/div><a href="http://mathoverflow.net/questions/262839/almost-totally-distinct-f
unctions" class="js-gps-track" data-gps-track="site.switch({ item_type:11, targe
t_site:504 }); posts_hot_network.click({ item_type:2, location:11 })">
Almost totally distinct functions
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-alcohol" title="Beer, Wine &amp; Spi
rits Stack Exchange"></div><a href="http://alcohol.stackexchange.com/questions/6
561/what-is-the-strongest-drink-in-the-world" class="js-gps-track" data-gps-trac
k="site.switch({ item_type:11, target_site:532 }); posts_hot_network.click({ ite
m_type:2, location:11 })">
What is the strongest drink in the world?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-puzzling" title="Puzzling Stack Exch
ange"></div><a href="http://puzzling.stackexchange.com/questions/49329/knights-a
nd-knaves-in-landilandia" class="js-gps-track" data-gps-track="site.switch({ ite
m_type:11, target_site:559 }); posts_hot_network.click({ item_type:2, location:1
1 })">
Knights and knaves in Landilandia
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-aviation" title="Aviation Stack Exch
ange"></div><a href="http://aviation.stackexchange.com/questions/35769/whats-the
-reasoning-for-safety-wire-on-aircraft-and-the-reasoning-behind-the-w" class="js
-gps-track" data-gps-track="site.switch({ item_type:11, target_site:528 }); post
s_hot_network.click({ item_type:2, location:11 })">
What&#39;s the reasoning for safety wire on aircraft, and th
e reasoning behind the way it&#39;s routed?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-english" title="English Language &am
p; Usage Stack Exchange"></div><a href="http://english.stackexchange.com/questio
ns/374852/onomatopoeia-for-disgust" class="js-gps-track" data-gps-track="site.sw
itch({ item_type:11, target_site:97 }); posts_hot_network.click({ item_type:2, l
ocation:11 })">
Onomatopoeia for disgust
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-codegolf" title="Programming Puzzles
&amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.co
m/questions/110788/smallest-multiplier-that-reveals-a-factor-of-a-semiprime" cla
ss="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:200 })
; posts_hot_network.click({ item_type:2, location:11 })">
Smallest multiplier that reveals a factor of a semiprime
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-academia" title="Academia Stack Exch
ange"></div><a href="http://academia.stackexchange.com/questions/85434/is-it-pos
sible-to-write-two-separate-masters-theses" class="js-gps-track" data-gps-track=
"site.switch({ item_type:11, target_site:415 }); posts_hot_network.click({ item_
type:2, location:11 })">
Is it possible to write two separate Master&#39;s theses?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-scifi" title="Science Fiction &amp;
Fantasy Stack Exchange"></div><a href="http://scifi.stackexchange.com/questions/
153105/who-are-these-han-solo-actors" class="js-gps-track" data-gps-track="site.
switch({ item_type:11, target_site:186 }); posts_hot_network.click({ item_type:2
, location:11 })">
Who are these &quot;Han Solo&quot; actors?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-salesforce" title="Salesforce Stack
Exchange"></div><a href="http://salesforce.stackexchange.com/questions/161440/ho
w-this-actually-update-where-there-is-no-change-in-record" class="js-gps-track"
data-gps-track="site.switch({ item_type:11, target_site:459 }); posts_hot_networ
k.click({ item_type:2, location:11 })">
How this actually update where there is no change in record?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-skeptics" title="Skeptics Stack Exch
ange"></div><a href="http://skeptics.stackexchange.com/questions/37351/did-buzz-
aldrin-take-communion-of-bread-and-wine-on-his-first-landing-on-the-moo" class="
js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:212 }); po
sts_hot_network.click({ item_type:2, location:11 })">
Did Buzz Aldrin take communion of bread and wine on his firs
t landing on the moon?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-workplace" title="The Workplace Stac
k Exchange"></div><a href="http://workplace.stackexchange.com/questions/85413/ho
w-do-i-decline-a-simple-task-from-a-customer" class="js-gps-track" data-gps-trac
k="site.switch({ item_type:11, target_site:423 }); posts_hot_network.click({ ite
m_type:2, location:11 })">
How do I decline a simple task from a customer?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-physics" title="Physics Stack Exchan
ge"></div><a href="http://physics.stackexchange.com/questions/313620/how-do-we-k
now-that-gravity-is-spacetime-and-not-a-field-on-spacetime" class="js-gps-track"
data-gps-track="site.switch({ item_type:11, target_site:151 }); posts_hot_netwo
rk.click({ item_type:2, location:11 })">
How do we know that gravity is spacetime and not a field on
spacetime?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-worldbuilding" title="Worldbuilding
Stack Exchange"></div><a href="http://worldbuilding.stackexchange.com/questions/
71795/would-a-large-number-of-people-simultaneously-turning-on-a-load-of-3-kw-be
-suffi" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_
site:579 }); posts_hot_network.click({ item_type:2, location:11 })">
Would a large number of people simultaneously turning on a l
oad of 3 kW be sufficient to bring down the electricity grid across 500 sq km?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-academia" title="Academia Stack Exch
ange"></div><a href="http://academia.stackexchange.com/questions/85286/why-do-re
searchers-use-extremely-complicated-english-sentences-to-convey-their-m" class="
js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:415 }); po
sts_hot_network.click({ item_type:2, location:11 })">
Why do researchers use extremely complicated English sentenc
es to convey their meaning?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-rpg" title="Role-playing Games Stack
Exchange"></div><a href="http://rpg.stackexchange.com/questions/95265/one-pc-do
ing-too-much-damage" class="js-gps-track" data-gps-track="site.switch({ item_typ
e:11, target_site:122 }); posts_hot_network.click({ item_type:2, location:11 })"
>
One PC doing too much damage
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-aviation" title="Aviation Stack Exch
ange"></div><a href="http://aviation.stackexchange.com/questions/35723/why-do-mo
del-aircraft-fly-and-maneuver-so-differently-from-real-aircraft" class="js-gps-t
rack" data-gps-track="site.switch({ item_type:11, target_site:528 }); posts_hot_
network.click({ item_type:2, location:11 })">
Why do model aircraft fly and maneuver so differently from r
eal aircraft?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-physics" title="Physics Stack Exchan
ge"></div><a href="http://physics.stackexchange.com/questions/313422/why-doesnt-
earth-appear-smudgy-or-blurred-in-space-photographs-due-to-its-fast" class="js-g
ps-track" data-gps-track="site.switch({ item_type:11, target_site:151 }); posts_
hot_network.click({ item_type:2, location:11 })">
Why doesn&#39;t Earth appear smudgy or blurred in space phot
ographs due to its fast rotation?
</a>
</li>
<li class="dno js-hidden">
<div class="favicon favicon-movies" title="Movies &amp; TV Stack
Exchange"></div><a href="http://movies.stackexchange.com/questions/69002/why-is
-this-funny-ok-well-it-s-definite-two-more-weeks-of-winter" class="js-gps-track"
data-gps-track="site.switch({ item_type:11, target_site:367 }); posts_hot_netwo
rk.click({ item_type:2, location:11 })">
Why is this funny: &#39;Ok, well, it s definite, two more week
s of winter&#39;
</a>
</li>
</ul>
<a href="#"
class="show-more js-show-more js-gps-track"
data-gps-track="posts_hot_network.click({ item_type:3, location:11 })
">
more hot questions
</a>
</div>
</div>
<div id="feed-link">
<div id="feed-link-text">
<a href="/feeds/question/28387312" title="feed of this question and its
answers">
<span class="feed-icon"></span>question feed
</a>
</div>
</div> <script>
StackExchange.ready(function(){$.get('/posts/28387312/ivc/fb9c');});
</script>
<noscript>
<div><img src="/posts/28387312/ivc/fb9c" class="dno" alt="" width="0" height
="0"></div>
</noscript><div style="display:none" id="prettify-lang">default</div></div>

</div>
</div>
<div id="footer" class="categories">
<div class="footerwrap">
<div id="footer-menu">
<div class="top-footer-links">
<a href="http://stackoverflow.com/company/about">about us</a
>
<a href="/tour">tour</a>
<a href="/help">help</a>
<a href="http://stackoverflow.blog?blb=1">blog</a>
<a href="http://chat.stackoverflow.com">chat</a>
<a href="http://data.stackexchange.com">data</a>
<a href="http://stackexchange.com/legal">legal</a>
<a href="http://stackexchange.com/legal/privacy-policy">priv
acy policy</a>
<a href="http://stackoverflow.com/company/work-here">work he
re</a>
<a href="https://www.stackoverflowbusiness.com/advertise">ad
vertising info</a>
<a href="http://stackoverflow.com/jobs/directory/develop
er-jobs">developer jobs directory</a>
<a onclick='StackExchange.switchMobile("on")'>mobile</a>
<b><a href="/contact">contact us</a></b>
<b><a href="http://meta.stackoverflow.com">feedback</a><
/b>
</div>
<div id="footer-sites">
<table>
<tr>
<th colspan=3>
Technology
</th>
<th >
Life / Arts
</th>
<th >
Culture / Recreation
</th>
<th >
Science
</th>
<th >
Other
</th>
</tr>
<tr>
<td>
<ol>
<li><a href="//stackoverflow.com" title="professional an
d enthusiast programmers">Stack Overflow</a></li>
<li><a href="//serverfault.com" title="system and networ
k administrators">Server Fault</a></li>
<li><a href="//superuser.com" title="computer enthusiast
s and power users">Super User</a></li>
<li><a href="//webapps.stackexchange.com" title="power u
sers of web applications">Web Applications</a></li>
<li><a href="//askubuntu.com" title="Ubuntu users and de
velopers">Ask Ubuntu</a></li>
<li><a href="//webmasters.stackexchange.com" title="pro
webmasters">Webmasters</a></li>
<li><a href="//gamedev.stackexchange.com" title="profess
ional and independent game developers">Game Development</a></li>
<li><a href="//tex.stackexchange.com" title="users of Te
X, LaTeX, ConTeXt, and related typesetting systems">TeX - LaTeX</a></li>
<li><a href="//softwareengineering.stackexchange.com" ti
tle="professionals, academics, and students working within the systems developme
nt life cycle who care about creating, delivering, and maintaining software resp
onsibly">Software Engineering</a></li>
<li><a href="//unix.stackexchange.com" title="users of L
inux, FreeBSD and other Un*x-like operating systems">Unix &amp; Linux</a></li>
<li><a href="//apple.stackexchange.com" title="power use
rs of Apple hardware and software">Ask Different (Apple)</a></li>
<li><a href="//wordpress.stackexchange.com" title="WordP
ress developers and administrators">WordPress Development</a></li>
</ol></td><td><ol>
<li><a href="//gis.stackexchange.com" title="cartographe
rs, geographers and GIS professionals">Geographic Information Systems</a></li>
<li><a href="//electronics.stackexchange.com" title="ele
ctronics and electrical engineering professionals, students, and enthusiasts">El
ectrical Engineering</a></li>
<li><a href="//android.stackexchange.com" title="enthusi
asts and power users of the Android operating system">Android Enthusiasts</a></l
i>
<li><a href="//security.stackexchange.com" title="inform
ation security professionals">Information Security</a></li>
<li><a href="//dba.stackexchange.com" title="database pr
ofessionals who wish to improve their database skills and learn from others in t
he community">Database Administrators</a></li>
<li><a href="//drupal.stackexchange.com" title="Drupal d
evelopers and administrators">Drupal Answers</a></li>
<li><a href="//sharepoint.stackexchange.com" title="Shar
ePoint enthusiasts">SharePoint</a></li>
<li><a href="//ux.stackexchange.com" title="user experie
nce researchers and experts">User Experience</a></li>
<li><a href="//mathematica.stackexchange.com" title="use
rs of Wolfram Mathematica">Mathematica</a></li>
<li><a href="//salesforce.stackexchange.com" title="Sale
sforce administrators, implementation experts, developers and anybody in-between
">Salesforce</a></li>
<li><a href="//expressionengine.stackexchange.com" title
="administrators, end users, developers and designers for ExpressionEngine&#174;
CMS">ExpressionEngine&#174; Answers</a></li>
<li><a href="//crypto.stackexchange.com" title="software
developers, mathematicians and others interested in cryptography">Cryptography<
/a></li>
</ol></td><td><ol>
<li><a href="//codereview.stackexchange.com" title="peer
programmer code reviews">Code Review</a></li>
<li><a href="//magento.stackexchange.com" title="users o
f the Magento e-Commerce platform">Magento</a></li>
<li><a href="//dsp.stackexchange.com" title="practitione
rs of the art and science of signal, image and video processing">Signal Processi
ng</a></li>
<li><a href="//raspberrypi.stackexchange.com" title="use
rs and developers of hardware and software for Raspberry Pi">Raspberry Pi</a></l
i>
<li><a href="//codegolf.stackexchange.com" title="progra
mming puzzle enthusiasts and code golfers">Programming Puzzles &amp; Code Golf</
a></li>
<li>
<a href="http://stackexchange.com/sites#technology"
class="more">
more (7)
</a>
</li>
</ol>
</td>
<td>
<ol>
<li><a href="//photo.stackexchange.com" title="professio
nal, enthusiast and amateur photographers">Photography</a></li>
<li><a href="//scifi.stackexchange.com" title="science f
iction and fantasy enthusiasts">Science Fiction &amp; Fantasy</a></li>
<li><a href="//graphicdesign.stackexchange.com" title="G
raphic Design professionals, students, and enthusiasts">Graphic Design</a></li>
<li><a href="//movies.stackexchange.com" title="movie an
d tv enthusiasts">Movies &amp; TV</a></li>
<li><a href="//music.stackexchange.com" title="musicians
, students, and enthusiasts">Music: Practice &amp; Theory</a></li>
<li><a href="//cooking.stackexchange.com" title="profess
ional and amateur chefs">Seasoned Advice (cooking)</a></li>
<li><a href="//diy.stackexchange.com" title="contractors
and serious DIYers">Home Improvement</a></li>
<li><a href="//money.stackexchange.com" title="people wh
o want to be financially literate">Personal Finance &amp; Money</a></li>
<li><a href="//academia.stackexchange.com" title="academ
ics and those enrolled in higher education">Academia</a></li>
<li>
<a href="http://stackexchange.com/sites#lifearts" cl
ass="more">
more (8)
</a>
</li>
</ol>
</td>
<td>
<ol>
<li><a href="//english.stackexchange.com" title="linguis
ts, etymologists, and serious English language enthusiasts">English Language &am
p; Usage</a></li>
<li><a href="//skeptics.stackexchange.com" title="scient
ific skepticism">Skeptics</a></li>
<li><a href="//judaism.stackexchange.com" title="those w
ho base their lives on Jewish law and tradition and anyone interested in learnin
g more">Mi Yodeya (Judaism)</a></li>
<li><a href="//travel.stackexchange.com" title="road war
riors and seasoned travelers">Travel</a></li>
<li><a href="//christianity.stackexchange.com" title="co
mmitted Christians, experts in Christianity and those interested in learning mor
e">Christianity</a></li>
<li><a href="//ell.stackexchange.com" title="speakers of
other languages learning English">English Language Learners</a></li>
<li><a href="//japanese.stackexchange.com" title="studen
ts, teachers, and linguists wanting to discuss the finer points of the Japanese
language">Japanese Language</a></li>
<li><a href="//gaming.stackexchange.com" title="passiona
te videogamers on all platforms">Arqade (gaming)</a></li>
<li><a href="//bicycles.stackexchange.com" title="people
who build and repair bicycles, people who train cycling, or commute on bicycles
">Bicycles</a></li>
<li><a href="//rpg.stackexchange.com" title="gamemasters
and players of tabletop, paper-and-pencil role-playing games">Role-playing Game
s</a></li>
<li><a href="//anime.stackexchange.com" title="anime and
manga fans">Anime &amp; Manga</a></li>
<li><a href="//mechanics.stackexchange.com" title="mecha
nics and DIY enthusiast owners of cars, trucks, and motorcycles">Motor Vehicle M
aintenance &amp; Repair</a></li>
<li>
<a href="http://stackexchange.com/sites#culturerecre
ation" class="more">
more (17)
</a>
</li>
</ol>
</td>
<td>
<ol>
<li><a href="//mathoverflow.net" title="professional mat
hematicians">MathOverflow</a></li>
<li><a href="//math.stackexchange.com" title="people stu
dying math at any level and professionals in related fields">Mathematics</a></li
>
<li><a href="//stats.stackexchange.com" title="people in
terested in statistics, machine learning, data analysis, data mining, and data v
isualization">Cross Validated (stats)</a></li>
<li><a href="//cstheory.stackexchange.com" title="theore
tical computer scientists and researchers in related fields">Theoretical Compute
r Science</a></li>
<li><a href="//physics.stackexchange.com" title="active
researchers, academics and students of physics">Physics</a></li>
<li><a href="//chemistry.stackexchange.com" title="scien
tists, academics, teachers and students">Chemistry</a></li>
<li><a href="//biology.stackexchange.com" title="biology
researchers, academics, and students">Biology</a></li>
<li><a href="//cs.stackexchange.com" title="students, re
searchers and practitioners of computer science">Computer Science</a></li>
<li><a href="//philosophy.stackexchange.com" title="thos
e interested in the study of the fundamental nature of knowledge, reality, and e
xistence">Philosophy</a></li>
<li>
<a href="http://stackexchange.com/sites#science" cla
ss="more">
more (3)
</a>
</li>
</ol>
</td>
<td>
<ol>
<li><a href="//meta.stackexchange.com" title="meta-discu
ssion of the Stack Exchange family of Q&amp;A websites">Meta Stack Exchange</a><
/li>
<li><a href="//stackapps.com" title="apps, scripts, and
development with the Stack Exchange API">Stack Apps</a></li>
<li><a href="//area51.stackexchange.com" title="proposin
g new sites in the Stack Exchange network">Area 51</a></li>
<li><a href="https://www.stackoverflowbusiness.com/talen
t">Stack Overflow Talent</a></li>

</ol>
</td>
</tr>
</table>
</div>
</div>
<div id="copyright">
site design / logo &#169; 2017 Stack Exchange Inc; user contribu
tions licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/" r
el="license">cc by-sa 3.0</a>
with <a href="http://blog.stackoverflow.com/2009/06/attribution-
required/" rel="license">attribution required</a>
</div>
<div id="svnrev">
rev 2017.2.21.25202
</div>
</div>
</div>
<noscript>
<div id="noscript-warning">Stack Overflow works best with JavaScript ena
bled<img src="https://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" cla
ss="dno"></div>
</noscript>
<script>var p = "http", d = "static"; if (document.location.protocol == "https:"
) { p += "s"; d = "engine"; } var z = document.createElement("script"); z.type =
"text/javascript"; z.async = true; z.src = p + "://" + d + ".adzerk.net/ados.js
"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore
(z, s);</script>
<script>
var ados = ados || {};
ados.run = ados.run || [];

ados.run.push(function () {
setTimeout(function () { $("#adzerk-user-match").remove(); }, wi
ndow.AUMIframeDone ? 0 : 2000);
ados_setKeywords('javascript,json,angularjs,text,xmlhttprequest,
x-persona-frontend');; ados_load();
});
</script>
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r
].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElem
ent(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.pare
ntNode.insertBefore(a, m);
})(window, document, 'script', 'https://www.google-analytics.com/ana
lytics.js', 'ga');
ga('create', 'UA-5620270-1');
ga('create', 'UA-5620270-59', {name: 'pageData', sampleRate: 5 }
);
ga('set', 'dimension2', '|javascript|json|angularjs|text|xmlhttp
request|');
ga('pageData.set', 'dimension2', '|javascript|json|angularjs|tex
t|xmlhttprequest|');
ga('send', 'pageview');
ga('pageData.send', 'pageview');
var _qevents = _qevents || [],
_comscore = _comscore || [];
(function () {
var ssl='https:'==document.location.protocol,
s=document.getElementsByTagName('script')[0],
qc=document.createElement('script');
qc.async = true;
qc.src = (ssl ? 'https://secure' : 'http://edge') + '.quantserve
.com/quant.js';
s.parentNode.insertBefore(qc, s);
_qevents.push({ qacct: "p-c1rF4kxgLUzNc" });
var sc=document.createElement('script');
sc.async=true;
sc.src=(ssl?'https://sb':'http://b') + '.scorecardresearch.com/b
eacon.js';
s.parentNode.insertBefore(sc, s);
_comscore.push({ c1: "2", c2: "17440561" });
})();
</script>

<script type="text/javascript">
(function(appendChild) {
Node.prototype.appendChild = function() {
var parent = this;
var newNode = arguments[0];
if (parent.nodeName === 'HEAD'
&& newNode
&& newNode.nodeName === 'SCRIPT'
&& newNode.src) {
window.setTimeout(function() {
var result = newNode.src.match(/^https:\/\/maps\
.googleapis\.com\/maps\/api\/place\/js\/(\w+)Service\./i) || [];
var service = result[1];
if (service) {
if (service === 'Autocompletion') service =
2;
else if (service === 'Place') service = 1;
else service = 0;
StackExchange.using('gps', function() {
StackExchange.gps.track('google_maps_pla
ces_api.call', { service: service });
});
}
}, 0);
}
return appendChild.apply(this, arguments);
};
})(Node.prototype.appendChild);
</script>
</body>
</html>

You might also like