How to generate .angular-cli.json file in Angular

2020-01-30 06:32发布

I have installed Angular CLI package separately using npm:

npm install --save-dev @angular/cli@latest

When I try to use commands cli I get an error:

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

How to generate .angular-cli.json for current project?

9条回答
你好瞎i
2楼-- · 2020-01-30 07:21

I couldn't see .angular-cli.json too. Because my Angular version is 6. ng version -> Angular CLI : 6.0.7. Check your Angular version.

查看更多
Root(大扎)
3楼-- · 2020-01-30 07:23

If you copy paste your project the .angular-cli.json you wil not find this file try to create a new file with the same name and add the code and it wil work.

查看更多
戒情不戒烟
4楼-- · 2020-01-30 07:26

In angular.json you can insert all css and js file in your template. Other ways, you can use from Style.css in src folder for load stylesheets.

@import "../src/fonts/font-awesome/css/font-awesome.min.css";
@import "../src/css/bootstrap.min.css";
@import "../src/css/now-ui-kit.css";
@import "../src/css/plugins/owl.carousel.css";
@import "../src/css/plugins/owl.theme.default.min.css";
@import "../src/css/main.css";
查看更多
登录 后发表回答