Unable to get property 'push" of undefined or null reference when calling list.push (WINJS List function) RRS feed

  • Question

  •             var appsList = WinJS.Binding.List();
                WinJS.xhr({ url: "http://localhost:52241/Myservice.svc/getApps" }).then(function (xhr) {
                    var apps = JSON.parse(xhr.response);                
                    apps.forEach(function (i) {
                            applicationId: i.ApplicationId,
                            applicationName: i.ApplicationName


    I am trying to bind a JSON object data to a WINJS list (for windows 8 app). I am getting the above error when calling the list with "push". Not sure whats going wrong here. Any tips to resolve this issue.

    Here is my JSON data for reference:


    Thursday, December 27, 2012 4:03 AM


  • Folks,

    I am able to resolve the issue after posting this thread :) Zeeeees....I spent lot of time to crack this simple mistake....I forgot to add "new" keyword for var appsList = WinJS.Binding.List();

    Resolution : var appsList = new WinJS.Binding.List();

    • Marked as answer by SurfaceRocks Thursday, December 27, 2012 4:10 AM
    Thursday, December 27, 2012 4:10 AM