angularangular6angular-cliangular-cli-v6

ng generate application to a specific folder (without projects folder)


I have a folder "dashboards". Inside that i'm trying to create applications using "ng g application promotions". But it creates inside projects/promotions. I also tried using "--flat". But it still creates folder. How to create without folder?


Solution

  • In your angular.json, change the property value of newProjectRoot from projects to dashboards.

    "newProjectRoot": "dashboards",

    If you create any new application in the workspace, then the app will be generated inside the dashboards folder.