我正在尝试将模块'smart-table‘添加到我的模块中。我已经按照网站(http://lorenzofox3.github.io/smart-table-website/)上的说明进行了安装,并使用bower install table smart -table来安装智能表。
angular.module("App", ['ngRoute','ui-leaflet'])当我将'smart-table‘添加到上面的代码中时:
angular.module("App", ['ngRoute','ui-leaflet','smart-table'])我的应用程序不再工作。我花了几个小时尝试不同的解决方案,包括,但我不明白为什么这些模块不能一起工作。
编辑:
这是来自我的index.html文件:
<script type="text/javascript" src="js/leaflet.js"></script>
<script type="text/javascript" src="/bower_components/angular-smart-table/dist/smart-table.js"></script>从我的bower.json文件中:
{
"name": "",
"homepage": "https://github.com/auth0-samples/auth0-angularjs-sample",
"authors": [
""
],
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"auth0-lock": "10.2.2",
"angular-jwt": ">= 0.1.3",
"angular-lock": "~1.0.2",
"a0-angular-storage": "0.0.5",
"angular-ui-router": "~0.3.1",
"bootstrap": "~3.3.7",
"angular-smart-table": "2.1.8"
},
"resolutions": {
"angular": "1.5.8"
}
}发布于 2017-01-18 18:32:55
首先要做的就是在html文件中包含
<script src="smart-table.js"></script> 然后添加到您的模块中
var app = angular.module('app',['smart-table']);https://stackoverflow.com/questions/41714518
复制相似问题