Interviews - C# Corner

Mohd Kashif
Can we change the prefix of a component? If yes, how?
By Mohd Kashif in Angular onMar 08 2019
  • Mohd Kashif
    Mar, 2019 8

    Yes we can replace the component's prefix. for an example :- I am going to create component 'home' so on that time selector name is but we want to change this 'app' into 'myprefix'. for this we can follow below steps:-There are two steps to find the solutions:- 1) changes in 'tslint.json' file - go to component-selector and do some changes "component-selector": [true,"element",["app", ""],"kebab-case"]2) In angular.json file and add prefix as 'myprefix'"prefix": "myprefix"Second way, if you are creating new project using angular-cli then using below command :- ng new project-name --prefix myprefix(anything)

    • 0

Most Popular Companies

Most Popular Job Functions