Angularjs Asp.Net does not give the Results.

Trying to work with angular js.
I am unable to get the results displayed on the UI, eventhough the results from the Controller call return valid json.
Attached is the project and the Screen shot.

I am unable to attach the .zip file of the entire VS2012 solution, hence attaching the js and controller file.
AngularError.png
controllers.js
HomeController.cs
as2007Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexandre SimõesManager / Technology SpecialistCommented:
Hi mate, from the sample files you sent I can't do anything.

Tell me:
1. If on the URL you call directly the controller, what's the reply?
2. What's your HTML code where you use AngularJS and consume that data?
0
Eddie ShipmanAll-around developerCommented:
Try using a full URL in your $http.get(()
0
as2007Author Commented:
Look at the screen shot AngularError.png. It shows the results of the call.

How can I upload a zip file with my solution?

I keep on getting an error:

The extension of one or more files in the archive is not in the list of allowed extensions: TestAngApplication/packages/DotNetOpenAuth.AspNet.4.1.4.12333/

Here is the code using the controller:

@{
    ViewBag.Title = "Home Page";
}
<div data-ng-app="">

    <div data-ng-controller="PhoneListCtrl">
       
        <div>
            Search <input data-ng-model="query" />

        Sort by:
        <select data-ng-model="orderProp">
        <option value="name">Alphabetical</option>
        <option value="age">Newest</option>
        </select>

        </div>
        <div>
             <ul>
                <li data-ng-repeat="phone in phones">
                    {{phone.name}}
                    <p>{{phone.snippet}}</p>
                </li>
              </ul>

            <div>    <p> Hello from {{ hello }}</p></div>

            <p>Total number of phones: {{phones.length}}</p>
         </div>

        <div>Within Ctrl Query is : {{query}}</div>
        <div>Order Property Valus is: {{orderProp}}</div>
       
    </div>
   
    <div>Outside Ctrl Query is : {{query}}</div>



</div>

@section scripts{
    <script src="~/js/controllers.js"></script>
}
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

as2007Author Commented:
Controller code.

public JsonResult GetPhones()
        {
            //string jsonResult = "[{\"name\": \"MOTOROLA XOOM™\",\"snippet\": \"The Next, Next Generation tablet.\",\"age\":2}]";
            var x = new {
                name="1",
                snippet="2",
                age="3"
           
            };
           return Json(x,JsonRequestBehavior.AllowGet);
            //return null;
        }
0
Eddie ShipmanAll-around developerCommented:
Maybe you need to set your ng-app value: <div data-ng-app="">
0
as2007Author Commented:
Did not work. Gave another error.

I have uploaded the solution onto Google Drive.

https://docs.google.com/file/d/0B0ezhdE7rAtdcy1Jb0NHWTFoS2c/edit?usp=sharing
0
Eddie ShipmanAll-around developerCommented:
Sorry, I only have VS2010.
0
as2007Author Commented:
Had to return an Array from the controller and it worked.
var x = new[]
            {
               
                new {
                    name="4",
                    snippet="5",
                    age="6"
           
                }

            };
0
Eddie ShipmanAll-around developerCommented:
OK, great, I won't object to a deletion request.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.