Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8965855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:54:02+00:00 2026-06-15T16:54:02+00:00

I am following the tutorial at http://www.youtube.com/watch?v=IRelx4-ISbs to use AngularJS $resource to get JSON

  • 0

I am following the tutorial at http://www.youtube.com/watch?v=IRelx4-ISbs to use AngularJS $resource to get JSON data of a stock index, such as the S&P 500, from Google Finance. However, when I write the result to console, I do not see the data. I get this in Google Chrome’s console:

  • e
  • __proto: 3
  • $delete
  • $get
  • $query
  • $remove
  • $save
  • constructor
  • __proto

However, when I go to “Network” in Chrome’s console, I see the get in the Name Path left column. When I click on the “info, I see five tabs on the right panel. Under the Preview and Response tabs, I see the correct data. I just don’t know how to see or retrieve that in my Javascript.

I attempted to put my code to http://jsfiddle.net/curt00/ycYn7/ but Google Chrome’s console is giving me “Uncaught Error: No module: Twitter”. (Does anybody know how to get around this error?) Here is the HTML code from my jsfiddle:

<!doctype html>
<html ng-app="Twitter">
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular-resource.min.js">
        </script>
    </head>
<body>
    <div ng-controller="TwitterCtrl"></div>
</body>
</html>

Here is the Javascript code from my jsfiddle:

angular.module('Twitter', ['ngResource']);

function TwitterCtrl($scope, $resource) {

var tickerSymbol = "INDEXSP:.INX";

var tempurl = 'https://finance.google.com/finance/info?client=ig&q=' + tickerSymbol.replace(":","%3A") + '&callback=?:action';

$scope.googleFinance = $resource(tempurl,
                                   {action:'&test=', q:'test', callback:'JSON_CALLBACK'},
                             {get:{method:'JSONP'}});

$scope.indexResult = $scope.googleFinance.get();

console.log('indexResult: ',$scope.indexResult);
}

Can anybody suggest how my code should be changed so that I can fetch the data from the response?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:54:03+00:00Added an answer on June 15, 2026 at 4:54 pm

    There are at least 2 things that are not correct:

    1. You are duplicating the parameters on your request. The tempurl should not contain any paramaters (i.e. https://finance.google.com/finance/info). If you want to pass parameters, do it within the actions (‘get’, ‘post’, ‘delete’, etc…) or set default parameters. For more information, check the angular.js $resource documentation.

    2. Google Finance response is actually an array, therefore you need to add isArray: true to your GET action in order for it to work

    jsFiddle: http://jsfiddle.net/8zVxH/1/

    P.S. I’m not familiar with the Google Finance API, so I don’t know if the results are the ones you expect. I’ve just ‘fixed’ your jsFiddle without changing the logic…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been following this tutorial - http://www.youtube.com/watch?v=R2hOvZ7bwXU , which explains how to use postMessage
I was following this tutorial on http://www.youtube.com/watch?v=LBnPfAtswgw and was able to replicate that in
I am currently working on implementing a like button, following the tutorial on http://www.youtube.com/watch?v=GG-kCSx0taU&feature=related
I'm following this tutorial http://www.vogella.com/articles/AndroidIntent/article.html for having some data transfered to parent activity by
I am following Html5rocks tutorial http://www.html5rocks.com/en/tutorials/file/dndfiles/ and I am trying to use readAsArrayBuffer instead
I'm following this tutorial: http://www.vogella.com/articles/RSSFeed/article.html It works great and i'm able to get all
I'm following this tutorial: http://www.javascripttoolbox.com/jquery/ And I'm trying to get table rows that are
I am following the following tutorial ( http://www.highoncoding.com/Articles/642_Creating_a_Stock_Widget_in_ASP_NET_MVC_Application.aspx ) on using ajax to render
I am following the tutorial: http://www.tutorialspoint.com/ruby/ruby_socket_programming.htm and using it to set up the Simple
I was following this tutorial: http://www.vogella.com/articles/AndroidLocationAPI/article.html --> Paragraph 6.0 Problem: My emulator runs perfectly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.