---
title: "How to bind a List in Angular js in mvc"  
description: "How to bind a List in Angular js in mvc"  
author: "Anonymous User"  
published: 2015-12-28  
updated: 2015-12-28  
canonical: https://www.mindstick.com/forum/33799/how-to-bind-a-list-in-angular-js-in-mvc  
category: ".net"  
tags: ["angular js", "mvc"]  
reading_time: 2 minutes  

---

# How to bind a List in Angular js in mvc

I want to bind a List in [Angular](https://www.mindstick.com/articles/13081/advantages-disadvantages-of-angularjs-is-that-ideal-for-your-project) [js in mvc](https://www.mindstick.com/forum/33800/how-to-add-edit-update-record-in-angular-js-in-mvc) .how to do this Please help me.

## Replies

### Reply by Anonymous User

AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology

```
@{
    ViewBag.Title = "Country";
    Layout = "~/Views/Shared/_Dashboard.cshtml";
}
<script src="/Scripts/angular.js" type="text/javascript"></script>
<script src="/Scripts/Country.js" type="text/javascript"></script>
<script language="javascript">
    var App = angular.module('Country', []);
    App.controller('CountryControler', Viewmodel);
</script>
<div data-ng-app="Country">
    <div class="box ui-draggable ui-droppable" data-ng-controller="CountryControler">
        <div class="box-header">
            <div class="box-name">
                <i class="fa fa-search"></i><span>Country List form</span>
            </div>
            <div class="box-icons">
                <a class="collapse-link"><i class="fa fa-chevron-up"></i></a><a class="expand-link">
                    <i class="fa fa-expand"></i></a><a class="close-link"><i class="fa fa-times"></i>
                </a>
            </div>
            <div class="no-move">
            </div>
        </div>
        <div class="box-content">
            <table class="table table-striped table-bordered table-hover table-heading no-border-bottom">
                <thead>
                    <tr>
                        <th>
                            Id
                        </th>
                        <th>
                            Country name
                        </th>
                        <th>
                            Country Code
                        </th>
                        <th>
                            Action
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr data-ng-repeat="item in Countrys">
                        <td>
                            {{item.countryId}}
                        </td>
                        <td>
                            {{item.countryName}}
                        </td>
                        <td>
                            {{item.countryCode}}
                        </td>
                        <td>
                            <button data-ng-click="Modify(item)">
                                Edit</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
country.js
```

```
var Viewmodel = function ($scope, $http) {

    $scope.Load = function () {
        $http.post('/Location/GetCountrys').
  success(function (data, status, headers, config) {
      $scope.Countrys = data;
  }).
  error(function (data, status, headers, config) {

  });
    }
    $scope.Load();
}
```

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EntityFramworkEcommerce;
namespace EntityFramworkEcommerce.Controllers
{
    public class LocationController : Controller
    {
        //

        // GET: /Location/
        EcommerceEntities db = new EcommerceEntities();

        public ActionResult Country()
        {
            return View();
        }

        [HttpPost]
        public  JsonResult GetCountrys()
        {
            return Json(db.country.ToList(), JsonRequestBehavior.AllowGet);
        }

    }
}
```

\
![How to bind a List in Angular js in mvc](https://www.mindstick.com/mindstickforums/ab6b3a15-2db0-45e5-bcb1-ee6a7811c76c/images/40f76a22-a839-4bc2-80ae-07d4b090b790.png)


---

Original Source: https://www.mindstick.com/forum/33799/how-to-bind-a-list-in-angular-js-in-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
