Tag: angular6

将jQuery脚本与Angular 6 CLI项目一起使用

我正在使用角度6开发应用程序。我的应用程序使用Minton主题 。 我在我的angular项目的index.html文件中包含了所有主题脚本。 但是当我登录或在路由之间导航时,一些jquery方法无法正常工作。 我不得不手动刷新页面以使它们工作。 有没有解决这个问题? 我找不到任何有效的解决方案了。 项目组件结构 app -components –footer –left-side-bar –header –pages —dashboard —-home —-accounts —login index.html文件 Logical Position var resizefunc = []; app.routing.module.ts文件 import { NgModule } from ‘@angular/core’; import { RouterModule, Routes } from ‘@angular/router’; import { DashboardComponent } from ‘./components/pages/dashboard/dashboard.component’; import { LoginComponent } from ‘./components/pages/login/login.component’; import { UnAuthGuardService } […]

Bootstrap无法在Angular 6应用程序中运行

我想在Angular 6应用程序中使用Bootstrap,这是我到目前为止所做的,但似乎没有任何结果: 1)使用npm安装bootstrap,jquery和popper.js。 2)在Angular.json文件中输入以下内容 “styles”: [ “src/styles.scss”, “node_modules/bootstrap/scss/bootstrap.scss” ], “scripts”: [ “node_modules/jquery/dist/jquery.slim.min.js”, “node_modules/popper.js/dist/umd/popper.min.js”, “node_modules/bootstrap/dist/js/bootstrap.min.js” … ] 我错过了什么。 这似乎没有成功。

Jquery无法工作在角度6错误:ENOENT:没有这样的文件或目录,打开’… \ node_modules \ jquery \ dist \ jquery.min.js’

我正在将Angular 5项目迁移到Angular 6。 在开始申请时 npm start 得到以下错误 ** Angular Live Development Server is listening on localhost: 9000, open your browser on http://localhost:9000/ ** 91% additional asset processing scripts-webpack-plugin× 「wdm」: Error: ENOENT: no such file or directory,open’\trunk\node_modules\jquery\dist\jquery.min.js’ 我试过了 npm install jquery –save npm install @types/jquery –save 没有什么工作 我检查了我的节点模块文件夹,我可以看到jquery文件 粘贴我的package.json和angular.json 的package.json “dependencies”: { “@angular/animations”: “^6.0.0”, “@angular/common”: “^6.0.0”, […]