Angularjs 未捕获的TypeError:$(…)。owlCarousel不是一个函数
我使用angular meteor来使用这个软件包,从这里安装它 在我看来,我把这个Angularjs 未捕获的TypeError:$(…)。owlCarousel不是一个函数,angularjs,meteor,owl-carousel,angular-meteor,Angularjs,Meteor,Owl Carousel,Angular Meteor,我使用angular meteor来使用这个软件包,从这里安装它 在我看来,我把这个 <div id="owl-demo" class="owl-carousel owl-theme"> <div class="item"><img src="http://placehold.it/2000x1000" alt="The Last of us"></div> <div class="item"><img src="ass
<div id="owl-demo" class="owl-carousel owl-theme">
<div class="item"><img src="http://placehold.it/2000x1000" alt="The Last of us"></div>
<div class="item"><img src="assets/fullimage2.jpg" alt="GTA V"></div>
<div class="item"><img src="assets/fullimage3.jpg" alt="Mirror Edge"></div>
</div>
<script>
$(function(){
$("#owl-demo").owlCarousel({
navigation : true, // Show next and prev buttons
slideSpeed : 300,
paginationSpeed : 400,
singleItem:true
// "singleItem:true" is a shortcut for:
// items : 1,
// itemsDesktop : false,
// itemsDesktopSmall : false,
// itemsTablet: false,
// itemsMobile : false
});
});
</script>
$(函数(){
$(“#猫头鹰演示”).owlCarousel({
导航:true,//显示下一个和上一个按钮
幻灯片速度:300,
分页速度:400,
singleItem:true
//“singleItem:true”是以下各项的快捷方式:
//项目:1,
//itemsDesktop:false,
//itemsDesktopSmall:错误,
//itemsTablet:false,
//itemsMobile:错误
});
});
但我总是觉得owlCarousel不是一个函数,我做错了什么
编辑
你能发布你包含的脚本吗?请原谅我的无知,但是meteor不是自动添加脚本吗?检查是否包含猫头鹰旋转木马脚本。另外,如果您使用angular,请使用angular方式:我在问题中添加了一些图片,它确实包含在内,但即使在控制台中也无法识别它。您应该将
$(“#owl demo”).owlCarousel({})
放在Template.name.onRendered()函数中。你为什么用标签?