지연로드 구성이있는 응용 프로그램을 가지고 있고 ng 서비스가 작동하지만 빌드를 수행하면 작동이 중지되고 오류가 발생하지 않습니다.Angular ng build 지연로드 지연로드
누락 된 프로세스가 있습니까? 나는 심지어 각도의 공식 문서를 읽고 무엇이든 놓치지 않는 것 같다.
각도 CLI 'ng new project-x'로 앱을 설치합니다. 최소 라이브러리가 있습니다.
여기 내 package.json입니다 :
{
"name": "single-boilerplate",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular-redux/store": "^6.5.7",
"@angular/animations": "^4.2.4",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.0",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"ng2-validation": "^4.2.0",
"redux": "^3.7.2",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "^1.5.0",
"@angular/compiler-cli": "^4.2.4",
"@angular/language-service": "^4.2.4",
"@types/es6-shim": "^0.31.35",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^6.0.90",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.3.3"
}
}
이 내 주요 라우터 : 지금 문제가 무엇인지 모릅니다
export const AppRoutes: Routes = [
{
path: '',
component: AppComponent,
children: [
{ path: '', loadChildren: './components/dashboard/dashboard.module#DashboardModule' }
]
},
{
path: '',
component: AuthComponent,
children: [
{ path: '', loadChildren: './components/auth/auth.module#AuthModule' }
]
},
{
path: '**',
redirectTo: '404'
}
];
. 이 일이 당신 누구에게나 일어 났습니까?
답장을 보내 주셔서 감사합니다. –
앱이 같은 방법으로로드되지만 내가/로그인과 같은 URL에 액세스하려고하면 404가 발견되지 않습니다. @mtpultz –
인증 모듈의 라우팅은 어떻게됩니까? 이처럼 – mtpultz