Red*_*ket 2 javascript angularjs smart-table
我正在尝试使用智能表.我按照这里提供的说明进行操作:http://lorenzofox3.github.io/smart-table-website/
因此,根据这些说明我需要做的就是运行,bower install angular-smart-table然后添加然后将模块添加angular.module('myApp',['smart-table']到角度应用程序中.这是我的角度应用:
# pwd
/var/www/html
# cat meanVoyApp.js
var app = angular.module("meanVoyApp", ['smart-table']);
Run Code Online (Sandbox Code Playgroud)
但是现在当我加载我的标记时,我在浏览器控制台中遇到了这些错误:
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
Run Code Online (Sandbox Code Playgroud)
我没有拼错,所以我想我"忘了"加载它.那么如何加载呢?如何判断它是否已经加载而其他问题是什么?
谢谢!
小智 5
你还记得在index.html中添加对脚本的引用吗?
<script src="[directoryOfModule]/smart-table.js"></script>
Run Code Online (Sandbox Code Playgroud)