Reputation: 1098
For some reason since upgrading from Angular 13 to Angular 15, when I type:
ng g c SomeComponent
Angular duplicates the component, creating duplicate files. This happens 100% of the time. A second weird thing (not sure if it's related), but it does not add ngOnInit()
to the components either.
Upvotes: 3
Views: 169
Reputation: 1098
Yes, the answer was upgrading. Someone already answered this, but the answer is not here. It was a bug in Angular. In the short term I just deleted the duplicate files. But when I upgraded the problem went away.
Upvotes: 0