16

I have an angular app which I'd like to rename. Is there an easy way to rename the app other than renaming manually all the occurrences of the app name (like the folder name, in package.json, etc..)

Thanks!

PhilDW
  • 20,260
  • 1
  • 18
  • 28
locke14
  • 1,335
  • 3
  • 15
  • 36

1 Answers1

5

You cannot !!

By default, Angular will create a project/app using name/alias app But after creating a new project if you wish to change the selectors for new component/service etc.

Then you can change the configuration in .angular-cli.json file under the

"prefix": "app",  //change with your name here
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
  • @SahilBabbar Just read my answer again, I already mentioned It will rename your new component after creating a project. and Nowhere mentioned that it will rename whole app. – Pardeep Jain May 21 '18 at 09:45
  • 1
    During the creation of the project you can specify --prefix="your-selector-prefix" to set the default prefix for your app. You will still need to rename the folder which angular creates for you (app). ref: [link](https://angular.io/cli/new#options) – Rino Reji Cheriyan Sep 23 '19 at 11:11