简体   繁体   English

自定义javascript / jquery无法在角度视图上运行

[英]Custom javascript/jquery not working on angular view

I'm new to angular and have built a simple single page application with routing to other pages. 我是angular的新手,并且构建了一个简单的单页面应用程序,可以路由到其他页面。 For some reason though I cannot write custom jquery/javascript on my pages. 由于某种原因,尽管我无法在页面上编写自定义jquery / javascript。 I want to implement simple bootstrap functionality ie (pop-up boxes),but I have been unsuccessful. 我想实现简单的自举功能,即(弹出框),但是我一直没有成功。 Ive installed bootstrap.js through nuget packager so it works fine just not the js part. 我已经通过nuget打包器安装了bootstrap.js,所以它可以正常工作,而不仅仅是js部分。 When I tried creating a simple index.html page outside of my views directory, everything worked fine however this page breaks out my routing sequence. 当我尝试在我的views目录之外创建一个简单的index.html页面时,一切工作正常,但是此页面打破了我的路由顺序。 Any Ideas? 有任何想法吗?

Take a look at this . 看看这个 Also make sure you are not initializing multiple instances of js/jquery. 还要确保您没有初始化js / jquery的多个实例。 Is your console showing you any errors? 您的控制台是否显示任何错误?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM