.angular-cli.json supports configuration for multiple applications . Therefore, we can set up a completely different configuration with different scripts / styles for the same application.
"apps": [ { "styles": [ "styles.css" ], "scripts": [ ], "environmentSource": "environments/environment.ts", "environments": { "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts", "local": "environments/environment.local.ts" } }, { "styles": [ "styles.css", "../node_modules/select2/dist/css/select2.min.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.min.js", "../node_modules/select2/dist/js/select2.full.min.js" ], "environmentSource": "environments/environment.ts", "environments": { "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts", "local": "environments/environment.local.ts" } }
To serve the default application: $ ng serve --app = 0
or
$ ng serve --app 0
To serve an application with a local environment:
$ ng serve --app=1 --env=local --port=8091
source share