angular:某些样式/jquery插件仅在页面刷新时正确加载

nzkunb0c  于 2021-09-13  发布在  Java
关注(0)|答案(0)|浏览(188)

我下载了一个html模板,并按照以下步骤将其转换为angular项目(https://www.freelancingdesign.com/step-by-step-to-convert-html-template-to-angular-7-template/)
当我重新加载任何页面时,一切正常,但当我在组件之间导航时,一些插件(例如:owl carousel)不工作。
angular.json文件:

"styles": [
          "src/assets/css/bootstrap-reboot.min.css",
          "src/assets/css/bootstrap-grid.min.css",
          "src/assets/css/owl.carousel.min.css",
          "src/assets/css/magnific-popup.css",              
          "src/assets/css/select2.min.css",
          "src/assets/css/paymentfont.min.css",
          "src/assets/css/slider-radio.css",
          "src/assets/css/plyr.css",             
          "src/assets/css/main.css",
          "src/styles.css"
        ],
        "scripts": [
          "src/assets/js/jquery-3.5.1.min.js",  
          "src/assets/js/bootstrap.bundle.min.js", 
          "src/assets/js/owl.carousel.min.js", 
          "src/assets/js/jquery.magnific-popup.min.js", 
          "src/assets/js/smooth-scrollbar.js",  
          "src/assets/js/select2.min.js",     
          "src/assets/js/slider-radio.js",    
          "src/assets/js/jquery.inputmask.min.js",             
          "src/assets/js/plyr.min.js",     
          "src/assets/js/main.js"
        ]

开发工具中没有错误。有什么想法吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题