角度2的模块之间的导航需要20到40秒。因为当我将角度2中的链接更改为另一个组件时,需要很长时间才能加载。这就是我正在使用的。
my angular-cli.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "md-pro-angular-cli"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"../node_modules/primeng/resources/themes/omega/theme.css",
"../node_modules/primeng/resources/primeng.min.css",
"styles.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../src/assets/js/jquery-ui.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.js",
"../src/assets/js/core/material.min.js",
"../node_modules/arrive/src/arrive.js",
"../node_modules/moment/moment.js",
"../node_modules/chartist/dist/chartist.js",
"../node_modules/twitter-bootstrap-wizard/jquery.bootstrap.wizard.js",
"../node_modules/bootstrap-notify/bootstrap-notify.js",
"../node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js",
"../node_modules/nouislider/distribute/nouislider.min.js",
"../node_modules/bootstrap-select/dist/js/bootstrap-select.js",
"../node_modules/datatables.net/js/jquery.dataTables.js",
"../node_modules/datatables.net-bs/js/dataTables.bootstrap.js",
"../node_modules/datatables.net-responsive/js/dataTables.responsive.js",
"../node_modules/fullcalendar/dist/fullcalendar.js",
"../node_modules/bootstrap-tagsinput/dist/bootstrap-tagsinput.js",
"../node_modules/jasny-bootstrap/dist/js/jasny-bootstrap.min.js",
"../src/assets/js/core/jquery.perfect-scrollbar.min.js",
"../src/assets/js/plugins/jquery-jvectormap.js",
"../src/assets/js/plugins/sweetalert2.min.js",
"../src/assets/js/core/jquery.validate.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
我的package.json。
{
"name": "md-angular-cli-pro",
"version": "1.6.1",
"license": "http://md-pro-angular.creative-tim.com/documentation/tutorial",
"repository": {
"type": "git",
"url": "https://github.com/creativetimofficial/material-dashboard-pro-angular.git"
},
"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.0",
"@angular/animations": "4.4.4",
"@angular/cdk": "^2.0.0-beta.12",
"@angular/common": "4.4.4",
"@angular/compiler": "4.4.4",
"@angular/core": "4.4.4",
"@angular/forms": "4.4.4",
"@angular/http": "4.4.4",
"@angular/material": "^2.0.0-beta.12",
"@angular/platform-browser": "4.4.4",
"@angular/platform-browser-dynamic": "4.4.4",
"@angular/platform-server": "4.4.4",
"@angular/router": "4.4.4",
"angular2-material-datepicker": "0.5.0",
"animate.css": "3.5.2",
"arrive": "2.3.1",
"bootstrap": "3.3.5",
"bootstrap-material-design": "0.5.10",
"bootstrap-notify": "3.1.3",
"bootstrap-select": "1.12.2",
"bootstrap-tagsinput": "0.7.1",
"chartist": "0.9.4",
"chartist-plugin-zoom": "0.4.0",
"core-js": "2.4.1",
"datatables": "1.10.12",
"datatables.net-bs": "1.10.12",
"datatables.net-responsive": "2.1.1",
"eonasdan-bootstrap-datetimepicker": "4.17.47",
"fullcalendar": "3.4.0",
"googleapis": "19.0.0",
"hammerjs": "^2.0.8",
"jasny-bootstrap": "3.1.3",
"jquery": "1.12.4",
"jquery-validation": "1.17.0",
"jvectormap": "2.0.4",
"moment": "2.18.1",
"moment-timezone": "0.4.0",
"ng2-nouislider": "1.6.1",
"ng2-select": "1.2.0",
"ngx-chips": "1.4.6",
"nouislider": "9.2.0",
"perfect-scrollbar": "1.1.0",
"primeng": "^4.2.4",
"rxjs": "^5.5.2",
"sweetalert2": "6.10.1",
"twitter-bootstrap-wizard": "1.2.0",
"uglify-js": "1.3.5",
"validate": "3.0.1",
"web-animations-js": "2.2.2",
"zone.js": "0.8.4"
},
"devDependencies": {
"@angular/cli": "1.4.2",
"@angular/compiler-cli": "4.4.4",
"@types/bootstrap": "3.3.32",
"@types/chartist": "0.9.34",
"@types/jasmine": "2.5.38",
"@types/jquery": "1.10.31",
"@types/node": "6.0.73",
"codelyzer": "2.0.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.1",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "0.2.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.1.0",
"ts-node": "2.0.0",
"tslint": "4.5.0",
"typescript": "2.4.2"
}
}
我已经搜索并应用了几件事,但是没有什么对我有用