我有一个基于Angular7的Angular应用,代码中出现了一个非常奇怪的问题。
当我多次加载同一页面时,该应用程序开始响应速度非常慢,甚至在重复加载同一页面后,我什至无法键入表格。
这不仅限于一页,而是所有页面在重复使用多个页面后会使应用变慢。
现在,关心的是如何检测哪个代码正在造成此问题?
我尝试更新Angular软件包,但没有任何帮助。
这是package.json
{
"name": "apex",
"version": "6.0.0",
"license": "",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "7.0.1",
"@angular/common": "7.0.1",
"@angular/compiler": "7.0.1",
"@angular/core": "7.0.1",
"@angular/forms": "7.0.1",
"@angular/http": "7.0.1",
"@angular/platform-browser": "7.0.1",
"@angular/platform-browser-dynamic": "7.0.1",
"@angular/platform-server": "7.0.1",
"@angular/router": "7.0.1",
"@ng-bootstrap/ng-bootstrap": "4.1.3",
"@ng-select/ng-select": "^2.16.2",
"@ngx-translate/core": "10.0.2",
"@swimlane/ngx-datatable": "^14.0.0",
"@types/jquery": "3.3.21",
"bootstrap": "4.0.0",
"bourbon": "5.0.0",
"classlist.js": "1.1.20150312",
"core-js": "2.5.3",
"file-droppa": "^1.8.0",
"intl": "1.2.5",
"jquery": "3.3.1",
"ng2-validation": "^4.2.0",
"ngx-bootstrap": "^4.0.1",
"ngx-chips": "^2.0.0-beta.0",
"ngx-toastr": "^9.1.2",
"ngx-ui-switch": "7.0.1",
"node-sass": "4.7.2",
"primeicons": "^1.0.0",
"primeng": "^7.1.2",
"resize-observer-polyfill": "1.4.2",
"rxjs": "6.3.3",
"screenfull": "3.3.1",
"web-animations-js": "2.2.5",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/cli": "7.0.3",
"@angular/compiler-cli": "7.0.1",
"@angular/language-service": "7.0.1",
"@types/jasmine": "2.8.6",
"@types/node": "9.4.7",
"codelyzer": "4.2.1",
"jasmine-core": "3.1.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "2.0.0",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "1.4.2",
"karma-jasmine": "1.1.1",
"karma-jasmine-html-reporter": "1.0.0",
"protractor": "5.3.0",
"rxjs-compat": "6.2.0",
"ts-node": "5.0.1",
"tslint": "5.7.0",
"typescript": "3.1.3",
"@angular-devkit/build-angular": "~0.6.8"
}
}
答案 0 :(得分:0)
这个问题太笼统了,您需要调试代码,看看是否有任何可能阻塞的同步请求。