AngularJS DFW Area Message Board › Need help with Array Data Binding when data comes from Restful Resource.

Need help with Array Data Binding when data comes from Restful Resource.

Denton, TX
Post #: 1
Hello fellow Angularians!

I am having some trouble with my view updating a results table after I call a Restful Resource that returns a data set. I've created a Fiddle to show what my issue is. It is located here. In this Fiddle, I have two arrays A-List and B-List; which hold Person objects. These two arrays are not defined on the $scope variable because this data really comes from a Restful Service call. I am trying to figure out why my view doesn’t show array values in my table.

Any help with this is much appreciated.

Thank you.
Denton, TX
Post #: 2
I figured out what my problem is as my fiddle proved to be data binding correctly. I think my problem with using dotJEM Angular-Routing; which is very similar to UI-Routing and not understanding how dotJEM Angular-Routing handles the scope/controllers via routes and views. I say this because when I remove dotJEM Angular-Routing from a test page that I stood up, my view updates correctly with the latest data results. So know what the problem is but don't know the solution, yet.
Denton, TX
Post #: 3
Okay I finally figured out what the solution to my problems was. Defining a the same controller on my routes proved to be the root of my problem because it was already defined in the index.html page. By simply removing the controller declaration on my routes enabled me to just use existing controller and Presto, no more array data binding issues.

Happy Coding :)
Powered by mvnForum

Our Sponsors

  • Kalkomey

    Provides our meeting place along with food and drinks for the meet up.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy