首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AngularJS多模块故障

AngularJS多模块故障
EN

Stack Overflow用户
提问于 2017-01-18 16:29:00
回答 1查看 81关注 0票数 0

我正在尝试将模块'smart-table‘添加到我的模块中。我已经按照网站(http://lorenzofox3.github.io/smart-table-website/)上的说明进行了安装,并使用bower install table smart -table来安装智能表。

代码语言:javascript
复制
angular.module("App", ['ngRoute','ui-leaflet'])

当我将'smart-table‘添加到上面的代码中时:

代码语言:javascript
复制
angular.module("App", ['ngRoute','ui-leaflet','smart-table'])

我的应用程序不再工作。我花了几个小时尝试不同的解决方案,包括,但我不明白为什么这些模块不能一起工作。

编辑:

这是来自我的index.html文件:

代码语言:javascript
复制
<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文件中:

代码语言:javascript
复制
{
  "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"
  }
}
EN

回答 1

Stack Overflow用户

发布于 2017-01-18 18:32:55

首先要做的就是在html文件中包含

代码语言:javascript
复制
<script src="smart-table.js"></script> 

然后添加到您的模块中

代码语言:javascript
复制
var app = angular.module('app',['smart-table']);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41714518

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档