如何在我的angular度js应用程序中正确设置checklist-model指令?
我是一个noob与node.js /咕噜世界,所以我很抱歉,如果这个问题是非常愚蠢的… … –
我有一个与yeoman / grunt一起工作的angular.js项目,现在我想要做的就是包含一个指令,特别是这个指令,
但我不知道如何安装它!
我有:
在我的命令提示符下使用命令npm install checklist-model
链接index.html文件内的脚本
<script src='node_modules/checklist-model/checklist-model.js'></script>
– 并在我的应用程序中添加依赖项
var app = angular.module('generaPreventivoApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngRoute', 'ngSanitize', 'checklist-model' ]);
控制台给我以下错误:
Error: [$injector:modulerr] Failed to instantiate module app due to: [$injector:modulerr] Failed to instantiate module checklist-model due to: [$injector:nomod] Module 'checklist-model' is not available
我怎样才能正确设置?
我试图安装使用鲍尔,所以:
凉亭安装清单模型 – 保存
我的凉亭更新:
{ "name": "genera-preventivo", "version": "0.0.0", "dependencies": { "angular": "^1.4.0", "bootstrap-sass-official": "^3.2.0", "angular-animate": "^1.4.0", "angular-cookies": "^1.4.0", "angular-resource": "^1.4.0", "angular-route": "^1.4.0", "angular-sanitize": "^1.4.0", "checklist-model": "^0.11.0" }, "devDependencies": { "angular-mocks": "^1.4.0" }, "appPath": "app", "moduleName": "generaPreventivoApp", "overrides": { "bootstrap": { "main": [ "less/bootstrap.less", "dist/css/bootstrap.css", "dist/js/bootstrap.js" ] } } }
的index.html
<script src="bower_components/checklist-model/checklist-model.js"></script>
APP.js
var app = angular.module('generaPreventivoApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngRoute', 'ngSanitize', 'checklist-model'
])
- 在validation失败时立即停止file upload
- 一起使用翡翠和把手,并相应地渲染
- 将数据保存到belongsToMany创build的表中,并从中读取(最后的解决scheme)
- Node.js UNMET PEER依赖与angular核和angularhttp
- 即使在为Angular js的node.js中添加标头之后,也要获得CROS错误
- POST和GET图像到/从Angular的MongoDB
- 如何在angularjs的ui.router的模板url中传递Nodejs的jade页面
- 使用AngularJS从Node.JS服务器下载文件
- 使用命名约定的W / Breeze Angular mySql Node Express堆栈的exception