考虑以下
<html ng-app="crudModule">
@{
ViewBag.Title = "Index";
}
<body ng-controller="crudController">
<table id="tblContainer" border="1">
<thead>
<tr>
<th>EmpName</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="emp in Employees" my-employee="emp"></tr>
</tbody>
</table>
<script type="text/ng-template" id="Employee.html">
<tr>
<td> <span>{{_employee.EmployeeId}}</span></td>
</tr>
</script>
</body>
</html>
<script src="~/Scripts/angular.js"></script>
<script src="~/Scripts/angular-route.js"></script>
<script src="~/Scripts/MyScripts/Module.js"></script>
<script src="~/Scripts/MyScripts/Service.js"></script>
<script src="~/Scripts/MyScripts/Controller.js"></script>
<script src="~/Scripts/MyScripts/Builder.js"></script>
<script src="~/Scripts/MyScripts/Utility.js"></script>
同一页面中有很多外部javascript文件。
有没有什么好方法可以让页面只有一个JS文件,而其他文件会在那里或其他任何方式?
答案 0 :(得分:0)