I need 2 different apps on same project:
- index.html > mainApp Module
- login.html > loginApp Module
(this is required for security reasons managed by Spring Security)
I vave angular-cli.json described below:
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,
"styles": [
"styles.scss"
],
"scripts": [],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
},
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "login.html",
"main": "login.ts",
"test": "login-test.ts",
"tsconfig": "login-tsconfig.json",
"prefix": "login-app",
"mobile": false,
"styles": [
"login-styles.scss"
],
"scripts": [],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
But only deploy the first one (on "apps" array).
If I invert Login at position [0], this works, but mainApp Module doesn't.
Apparently the reason is, Angular Cli doesn't inject created JS files on the second html.
How can I resolve this?