![](/img/trans.png)
[英]Defining a controller in a $routeProvider route that is located in a separate file
[英]Defining smoothScroll.init(); in separate file
我正在使用 smooth-scroll.js 并调用smoothScroll.init();
在我的脚注中脚本标签之间。 一切都很好,但我想移动smoothScroll.init();
到我的“site.js”文件。 但是,当我这样做时,它不起作用,并且出现了smoothScroll.init();
错误smoothScroll.init();
没有定义。 我需要做什么来定义它并使其在 site.js 中工作。 非常感谢你花时间陪伴!
确保您的site.js
脚本标签在smooth-scroll.js
标签之后。
如果是之前,将在定义之前调用smoothScroll.init()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.