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 8433789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:29:02+00:00 2026-06-10T06:29:02+00:00

I started playing with Angular.js recently, and got a demo project working pretty well.

  • 0

I started playing with Angular.js recently, and got a demo project working pretty well. However, when I attempted to load the data from a backend web service versus just a hard coded array I started getting hung up. Specifically the page doesnt seem to properly data bind after i set the $scope using $.getJSON().done(…). Instead of just assigning a value to $scope after .getJSON is done, should I be doing it somewhere else/differently? I searched high and low and really couldnt find any good examples of angular thats pulling intial data from a backend.

Thanks in advance for any help with this!

  • 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-10T06:29:04+00:00Added an answer on June 10, 2026 at 6:29 am

    Since you are trying to update the $scope outside of Angular you will have to make your model changes using the $apply method on the scope.

    Maybe something like:

        $.getJSON('ajax/test.json', function(data) {
            $scope.$apply(function(){
                $scope.modelData = data;
            });
        });
    

    The preferred way to access a backend with AngularJS would be to use the $http or $resource service in place of jQuery. You won’t have to use $scope.$apply you can just update your $scope.modelData directly.

    This post has a good fiddle of updating a model outside of Angular code.

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

Sidebar

Related Questions

I started playing with Racket pattern matching system recently and got into a problem
I have recently started playing around with iOS development and have got most of
I started playing with Blueprint CSS tonight and things are going pretty well. Up
Just started playing around with ice_cube I've got a weekly schedule (with a granularity
I've started playing with Ninject and from a screencast it states the following is
I have recently started playing around with sites and created a basic page. <apex:page
Today I started playing with the MVC 3 Beta. Started with an application from
I've recently started playing around with ASP.NET and I was just about to connect
I've recently started playing around with Specflow, and generating test cases based on the
I have just started playing with TeamCity and its great. Now I got it

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.