本文介绍了Ng重复不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ng-repaeat没有角度工作。



我尝试过:



ng-repaeat is not working in angular.

What I have tried:

<!DOCTYPE html>
<html>
<head>
    <script src="scripts/angular.min.js"></script>
    <script src="scripts/JavaScript1.js"></script>

    <title></title>
</head>
<body>
    <div ng-app="mymodule" ng-controller="mycontroler">

        <table>
            <thead>
                <tr>
                    <td>
                        First Name
                    </td>
                    <td>
                        Seconed Name
                    </td>
                    <td>
                        Address
                    </td>
                   
                </tr>
            </thead>
            <tbody >
                <tr ng-repeat ="employee in emp">
                    <td>
                        
                        employee.Fname
                    </td>
                     <td>
                    employee.Sname
                    </td>
                       <td>
                        employee.address
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>
















/// <reference path="angular.min.js" />
var app = angular.module("mymodule", []).controller("mycontroler", function () {
    var emp = [{ Fname: "vikrant", Sname: "gupta", address: "ganj" }, {Fname:"arpit", Sname:"gupta", address:"ganj" }
    ];
    $scope.emp = emp;

});







善意帮助




kindly help

推荐答案







亲切帮助




kindly help



var app = angular.module("mymodule", []).controller("mycontroler", ['


这篇关于Ng重复不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 22:33