[英]Slick javascript installed in MEAN stack ANGULAR
我正在嘗試通過以下一種觀點進行設置: http : //kenwheeler.github.io/slick/
無論我將以下代碼放在哪里:
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.5.9/slick.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
console.log("slicking");
$('.butikk').slick({});
});
</script>
它不會激活浮油。
我嘗試在主體視圖主體中,在主體結尾處嘗試在.butikk
所在的視圖中進行.butikk
。
我如何使Slick正常工作?
我不知道它是否可以在angularjs envoirement中使用
如果我嘗試在控制台中使用slicker:
未捕獲的TypeError:$(...)。slick不是函數(...)
但我相信發生錯誤是由於未正確加載錯誤,僅當我從控制台日志中調用該錯誤時,才在代碼的其他位置獲得該錯誤。
編輯1:
在嘗試此http://vasyabigi.github.io/angular-slick/時 ,我的網站負載很大。 它不會加載。 而且角度花費的時間太長。
我也安裝了這個:
Unable to find a suitable version for angular, please choose one by typing one of the numbers below:
1) angular#~1.3.0 which resolved to 1.3.20 and is required by angular-slick#0.2.1
2) angular#1.5.5 which resolved to 1.5.5 and is required by angular-animate#1.5.5
3) angular#^1.0.8 which resolved to 1.5.8 and is required by angular-ui-router#0.2.18
4) angular#~1.5.0 which resolved to 1.5.8 and is required by meanjs
5) angular#>=1.4.0 which resolved to 1.5.8 and is required by angular-bootstrap#1.2.5
6) angular#^1.1.5 which resolved to 1.5.8 and is required by angular-file-upload#2.2.0
Prefix the choice with ! to persist it to bower.json
涼亭文件:
{
"name": "meanjs",
"description": "Fullstack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
"homepage": "http://meanjs.org/",
"license": "MIT",
"dependencies": {
"angular": "~1.5.0",
"angular-animate": "~1.5.0",
"angular-bootstrap": "~1.2.1",
"angular-file-upload": "~2.2.0",
"angular-messages": "~1.5.0",
"angular-mocks": "~1.5.0",
"angular-resource": "~1.5.0",
"angular-ui-router": "~0.2.18",
"bootstrap": "~3.3.6",
"owasp-password-strength-test": "~1.3.0",
"angular-slick": "~0.2.1"
},
"resolutions" : {
"angular" : "1.3.15",
}
"overrides": {
"bootstrap": {
"main": [
"dist/css/bootstrap.css",
"dist/css/bootstrap-theme.css",
"less/bootstrap.less"
]
},
"jquery": {
"main": []
}
}
}
編輯2:
嘗試bower update
然后我得到這個:
Unable to find a suitable version for angular, please choose one by typing one of the numbers below:
1) angular#~1.3.0 which resolved to 1.3.20 and is required by angular-slick#0.2.1
2) angular#1.5.8 which resolved to 1.5.8 and is required by angular-animate#1.5.8, angular-messages#1.5.8, angular-mocks#1.5.8, angular-resource#1.5.8
3) angular#>=1.4.0 which resolved to 1.5.8 and is required by angular-bootstrap#1.2.5
4) angular#~1.5.0 which resolved to 1.5.8 and is required by meanjs
5) angular#^1.1.5 which resolved to 1.5.8 and is required by angular-file-upload#2.2.0
6) angular#^1.0.8 which resolved to 1.5.8 and is required by angular-ui-router#0.2.18
Prefix the choice with ! to persist it to bower.json
通過對slick存儲庫的github問題進行一些搜索,我找到了這個有角度的庫。 使用起來似乎很簡單,請嘗試一下
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.