[英]How to use my own custom js plugin within ionic 3 mobile app?
I created a js plugin using jQuery which I already used in my web application. 我使用jQuery创建了一个js插件,我已经在我的Web应用程序中使用了它。 Now I want use it on my IONIC 3 mobile app.
现在我想在我的IONIC 3移动应用程序上使用它。 I installed typings and jquery in my project those are working well there then how I can use my own custom jquery plugin in my IONIC 3 project.
我在我的项目中安装了typings和jquery那些在那里工作得很好然后我如何在我的IONIC 3项目中使用我自己的自定义jquery插件。
Please give me a best possible solution. 请给我一个最好的解决方案。
It is possible to include your plugin in the index.html
file and that's exactly what you have to do. 可以在
index.html
文件中包含您的插件,这正是您必须要做的。
Just copy your plugin to the src/assets/
folder and then include it in your index.html
like you would on any webapp: 只需将您的插件复制到
src/assets/
文件夹,然后将其包含在index.html
就像在任何webapp上一样:
<script src="assets/plugin.js"></script>
(The path might be incorrect, you have to try which one works) <script src="assets/plugin.js"></script>
(路径可能不正确,你必须尝试哪一个工作)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.