Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i bind the values from controller to the table in view?
My code is:


XML
<table class="table table-striped">
            <thead>
                <tr>
                    <th>Employee ID</th>
                    <th>Name</th>
                    <th>Designation</th>
                    <th>Mobile No</th>
                </tr>
            </thead>
            <tbody>

                <tr data-ng-repeat="item in emp">
                    <td>{{item.id}}</td>
                    <td>{{item.name}}</td>
                    <td>{{item.designation}}</td>
                    <td>{{item.mobile}}</td>
                    <td><input type="button" data-ng-click="delete(item)" value="Delete" /></td>
                </tr>
            </tbody>
        </table>
<script>
<pre lang="php">$scope.load = function () {

                $http.get('../Home/getList').success(function (emp) {
                    alert(response);
                }).error(function (response) {
                    alert('end');
                });}
 $scope.load();
</script>
Posted
Updated 16-Jul-15 2:54am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900