我正在尝试开始使用智能表。我正在按照此处提供的说明进行操作:http://lorenzofox3.github.io/smart-table-website/
因此,根据这些说明,我需要做的就是运行 bower install angular-smart-table
然后添加模块 angular.module('myApp',['smart-table ']
到你的 Angular 应用程序。这是我的 Angular 应用程序:
# pwd
/var/www/html
# cat meanVoyApp.js
var app = angular.module("meanVoyApp", ['smart-table']);
但是现在当我加载我的标记时,我在我的浏览器控制台中收到这些错误:
Uncaught Error: [$injector:modulerr] Failed to instantiate module meanVoyApp due to:
Error: [$injector:modulerr] Failed to instantiate module smart-table due to:
Error: [$injector:nomod] Module 'smart-table' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.14/$injector/nomod?p0=smart-table
我没有拼错,所以我想我“忘记”加载它了。那么我该如何加载呢?我如何判断它是否已加载以及其他问题?
谢谢!
最佳答案
您是否记得在 index.html 中添加对脚本的引用?
<script src="[directoryOfModule]/smart-table.js"></script>
关于javascript - 模块 'smart-table' 不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33574727/