我正在尝试为我的项目使用可拖动的 Javascript 库。
<script type="text/javascript" src='js/dragtable.js'></script>
<div class="div_wrapper" >
<table id="table1" class="unassignedMerchants draggable" border="1">
<thead>
<tr>
<th>ID</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in tenUnassignedMerchants">
<td>{{ item.id }}</td>
</tr>
</tbody>
</table>
在index.html页面中它工作正常,但是当我尝试在作为项目一部分的另一个.html页面中使用它时它不工作。 有什么方法可以让这个库对其他页面可见?</p>
最佳答案
这取决于如何添加此库以及它如何与您的组件连接。
例如组件如何知道它是可分级的。它可以将指令作为类或属性添加到您的元素中...
关于javascript - Dragtable Javascript 库并不适用于每个页面。仅在 Index.html 中导入库的地方?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47672341/