- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在index.html文件中多次生成相同的脚本文件,我最近将项目升级到了Angular 8.0.2版本
升级 Angular 版本后,在 index.html
文件中遇到此复制问题。
This is
JavaDemoProject
java project, i run the angular application with thisjavaproject
with the help ofpom.xml
fileI build the project through maven command(
mvn clean install -Penv-dev -DskipTests -DbuildNumber=04
)
pom.xml
文件
<plugin>
<groupId>com.github.testDemo</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<workingDirectory>../Angular-Project</workingDirectory>
<installDirectory>temp</installDirectory>
</configuration>
<executions>
<!-- It will install nodejs and yarn -->
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>v11.7.0</nodeVersion>
<yarnVersion>v1.9.4</yarnVersion>
</configuration>
</execution>
<!-- It will execute command "yarn install" inside "/angular"
directory -->
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<!-- It will execute command "yarn build" inside "/angular"
directory to clean and create "/dist" directory -->
<execution>
<id>yarn javaDemoprod </id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>javaDemoprod --outputPath=../JavaDemoProject/
src/main/resources/templates/dist</arguments>
</configuration>
</execution>
</executions>
</plugin>
tsconfig.json
文件:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "commonjs",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
],
"resolveJsonModule": true,
"esModuleInterop": true
}
}
这是 angular.json
文件:
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/Angular-Project",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"showCircularDependencies": false,
"assets": [
"src/favicon.ico",
"src/eg.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [],
"aot": true
}
}
Package.json
"dependencies": {
"@angular/animations": "^8.0.1",
"@angular/cdk": "^8.0.1",
"@angular/common": "^8.0.1",
"@angular/compiler": "^8.0.1",
"@angular/core": "^8.0.1",
"@angular/forms": "^8.0.1",
"@angular/material": "^8.0.1",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.1",
"@angular/router": "^8.0.1",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"ngx-loading": "^3.0.1",
"node-sass": "^4.10.0",
"rxjs": "6.5.2",
"underscore": "^1.9.1",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.2",
"@angular/compiler-cli": "^8.0.1",
"@angular/language-service": "^8.0.1",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"bootstrap-sass": "^3.3.7",
"codelyzer": "^5.0.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-scss-preprocessor": "^3.0.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~3.4.5"
}
After build the application in
index.html
path of the fileJavaDemoProject\src\main\resources\templates\dist\index.html
am getting this replication ofscript
files, how can i prevent this replicatescript
files.
<body>
<app-root></app-root>
<script src="runtime-es2015.js" type="module"></script>
<script src="polyfills-es2015.js" type="module"></script>
<script src="runtime-es5.js" nomodule></script>
<script src="polyfills-es5.js" nomodule></script>
<script src="styles-es2015.js" type="module"></script>
<script src="styles-es5.js" nomodule></script>
<script src="vendor-es2015.js" type="module"></script>
<script src="main-es2015.js" type="module"></script>
<script src="vendor-es5.js" nomodule></script>
<script src="main-es5.js" nomodule></script>
</body>
This replications of script file am getting the output of the application showing
This page isn't working...
ERR_TOO_MANY_REDIRECTS
谁能帮我解决这个问题。提前致谢。
最佳答案
您能够看到的脚本是因为差异加载功能。Angular 8 有一个新功能,可以为旧浏览器和新浏览器生成单独的 bundle 。您可以控制要支持的浏览器,您可以阅读有关此功能的更多信息 https://angular.io/guide/deployment#differential-loading
关于java - 为什么让 `This page isn' t 工作... ERR_TOO_MANY_REDIRECTS`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56929757/
我已经盯着它看了好几个小时了,想不出解决办法;我通常使用正则表达式处理这种类型的验证,但我正在尝试使用内置解决方案进行更改(显然,我不经常这样做): private static double pro
有什么区别 grep -isn "String\.format" -R . 和 grep -isn String\.format -R . 当我使用后者时,结果包括String format和Stri
我有一部固件为 4.3 的 iPhone 3GS。我下载了 3.1.3 固件,并希望使用 Organizer 恢复 iPhone。但!我收到以下错误: “此设备不符合所请求的版本。” 知道出了什么问题
我创建了一个小界面: import ... abstract class IController { void navigateTo(BuildContext context, String ro
基础this Question我使用扩展方法在 dart 中创建了一个枚举: enum TagVisibility { public, shared, private, } extensi
我在 Play 商店中放置了一个应用程序,我的 friend 正在运行 4.1(Nexus 7),在尝试安装我的应用程序时收到以下消息:“您的设备与此版本不兼容”。这是为什么来的?请任何人帮助我。 M
我在 Play 商店中放置了一个应用程序,我的 friend 在两台设备上运行 4.0.3,在尝试安装我的应用程序时收到以下消息:“您的设备与此版本不兼容”。 一台设备允许安装,另一台不允许。我允许
#!/usr/bin/env perl use warnings; use 5.12.2; my $c = 'f'; # could be a number too if ( $c eq 'd' ||
我正在编写一个Cocoa应用程序,我想实现一个全局热键功能。我实现了 Waffle Software 的 ShortcutRecorder.framework,并向我的 xib 添加了一个 custo
当我在开发该应用程序时,我点击了“运行”,一旦应用程序启动,它就会在打开启动屏幕之前卡住,并向我显示“应用程序没有响应,您想关闭它吗” 对话。!! !我什至没有打开闪屏类。!我在 OnCreate 中
大约 12 小时前,我尝试使用“beautiful jekyll”创建个人博客。 '。我遵循最简单的三步方法来运行一个基本的博客,但是,每次我输入我的网站链接时,我都会得到 There isn't a
我正在解析制表符分隔的文件。有几列没有被识别为数字,即使它们显然是数字。当我尝试总结这些值时,会显示错误:Argument ""97""isn't numeric in addition (+) 并且
我有两个模型:posts 和 likings 它们具有一对多关系(因此,一个帖子有很多喜欢)。 Likings 模型还有一个 isActive 字段,它显示喜欢是主动的还是被动的。 我想获得(排序)获
我的 android 模拟器(没有 play store 的 api 30)不时显示这个错误对话框: 我点击“关闭应用程序”,屏幕瞬间变黑,然后一切恢复正常。 发生这种情况时,我会在 Logcat 中
我正在尝试使用 Electron 构建 Windows 和 Mac OS 应用程序,但遇到了障碍。 简而言之,如果我尝试在 Mac OS Big Sur 上直接使用 Electron 运行应用程序(而
use List::MoreUtils 'uniq'; print join ", ", sort uniq ("b", "a", "a"); 结果参数“a”在排序中不是数字... print joi
background: ShaderMask( shaderCallback: (rect) { return LinearGradient( begin: Ali
我正在尝试创建一个多项选择应用程序来计算正确和错误答案的数量。 一切都呈现良好,但应用程序无法正常工作: 用户的选择并不能定义为正确或错误的答案。 问题不会更改为下一个问题。 我好像在onClick(
我正在开发一个需要帐户链接的 Google 助理应用程序,我已经到了这样的步骤:如果我说“与 [我的应用程序名称] 交谈”,我会取回一张卡片带有文本“Link [my app name] to Goo
编译时出现以下错误: MenuNavigationApp.c:58: error: array type has incomplete element typeMenuNavigationApp.c:
我是一名优秀的程序员,十分优秀!