简体   繁体   中英

Trying to do ng generate component in my cli but it is saying Unable to find any apps in `.angular-cli.json`

I am working with angular 4, firebase and ionic 3 for my app. I am trying to ng generate component login in my command line but it says Unable to find any apps in .angular-cli.json . I have a package.json in my folder, but how do i add .angular-cli.json. This is what I have in my folder. Do you think it is because I am using ionic serve and not ng serve?

在此处输入图片说明

You should use Ionic Cli which you would have installed using npm i -g ionic

It does not have angular-cli.json to use angular cli on the project

To generate page do:

ionic g page login

For a component:

ionic g component login

See full list here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM