I need 2 different applications in one project:
- index.html> mainApp module
- login.html> loginApp Module
(this is necessary for security reasons that Spring Security manages)
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 expand only one (in the "apps" array).
If I invert Login at position [0], this works, but the mainApp module does not.
Apparently, the reason is because Angular Cli doesn't inject the generated JS files into the second html.
How can i solve this?