问题
I'm wondering why I am getting this kind of message whenever I try to add a component in my angular project although I have Angular CLI installed in my project.
回答1:
As far as i know does ionic 3 dont create a angular.json, and that's what angular i looking for when you want to create for example a pipe.
When you want to create a pipe in ionic 3 just run ionic g pipe myPipe.
When you upgrade to ionic 4+ it will create a angular.json like a normal angular project would do.
See here ("@ionic/angular": "^4.7.1")
Then you can run all kind of ng command your used to from angular.
来源:https://stackoverflow.com/questions/58618391/the-generate-command-requires-to-be-run-in-an-angular-project