ng serve command builds and serve the application. Це rebuilds the application if changes occur. Тут проект є ім'ям application, який define в angular. json.
Difference між ng serve and ng build The ng build command is intentionally for building the apps and deploying the build artifacts. Command does не generate an output folder. The output folder is – dist/. The serve serve builds artifacts from memory instead for faster development experience.
Both ng build and ng serve clear the output folder before they build the project, but тільки the ng build command writes the generated build artifacts to the output folder. output folder is dist/project-name/ by default. Для того, щоб відкрити різні компоненти, змінювати outputPath in angular.json .