arod
arod

Reputation: 124

How to add class to to angular application using angular-cli command: 'ng generate class' without receiving error

I'm referenceing https://www.sitepoint.com/ultimate-angular-cli-reference/, which says, To add a class called 'UserProfile', run:

$ ng generate class user-profile

When I run this command, I get

installing class  
Unable to find any apps in `angular-cli.json`

Upvotes: 0

Views: 774

Answers (1)

angularconsulting.au
angularconsulting.au

Reputation: 28309

Based on this source code you got that error because your .angular-cli.json does not containg apps field. Just generate a new sample-app and compare its.angular-cli.json with your one.

Upvotes: 1

Related Questions