Questions tagged [angular-cli]

The Angular CLI is a command line interface for building, managing and deploying Angular (version 2+) applications.

The Angular CLI is a command line interface for building, managing and deploying Angular (version 2+) applications. It can be used to generate part of the application, serving in a local server, analysing code quality, etc. It is based on ember-cli project.

Installation

npm install -g @angular/cli

Usage

ng help

Generating and serving an Angular project via a development server

ng new PROJECT-NAME
cd PROJECT-NAME
ng serve

For more information, please visit the following links.

7329 questions
4
votes
2 answers

How could i change the angular cli date to local time zone?

I use ng serve and when I change some file, Angular CLI will display date like this Date: 2018-08-26T13:55:06.527Z - Hash: be4766fc643be6692ac3 - Time: 126ms But the Date:2018-08-26T13:55:06.527Z is not my local time. How could I change the angular…
4
votes
0 answers

protractor e2e test with angular library E/launcher - Error: ReferenceError: window is not defined

I have developed some angular libraries with angular-cli 6. Running the e2e the with protractor I have the following error: E/launcher - Error: ReferenceError: window is not defined at Object.
ms86
  • 227
  • 1
  • 7
4
votes
1 answer

ng serve doesn't recognize -- port option in Windows

ng serve doesn't recognize -- port option in Windows. But it is running while using npm run ng serve --port portnumber and is always defaulting to 4200: oml005@W7-2UA532159M MINGW64 /d/COT-TF/cot-web/cot-web (master) ng serve --host 0.0.0.0 --port…
TOM
  • 85
  • 1
  • 5
4
votes
2 answers

Installing Angular 5 through which CLI version

I am using Ubuntu 18 and want to start the Angular 5 project and therefore I installed Node, npm, TypeScript and finally the latest stable Angular CLI by below command, sudo npm install -g @angular/cli So, by default it is downloading the latest…
ArifMustafa
  • 4,617
  • 5
  • 40
  • 48
4
votes
1 answer

How configure inline style and html template in `angular.json`?

It look like all tutorials show how config it in the old angular.cli.json format. "defaults": { "styleExt": "css", "component": { "inlineStyle":true, "inlineTemplate":true } } but not in the angular.json format. and that arises the…
pery mimon
  • 7,713
  • 6
  • 52
  • 57
4
votes
3 answers

How to install angular cli for node

I am trying to install angular cli but i am getting below the message. How can i install specific angular cli version for nodejs v6.x.x.which angular cli verion is suitable for nodsjs v6.x.x? You are running version v6.x.x of node.js, which is not…
Apple Orange
  • 646
  • 5
  • 12
  • 27
4
votes
1 answer

Angular: combining Applications but developed as separate Projects

I would like to know if the following is possible with Angular 6 (note that where I use the term "subsystems" it's similar to Angular's "Applications") The purpose is to create a unified view of otherwise separate subsystem web sites. I was able…
Various Artist
  • 357
  • 5
  • 16
4
votes
3 answers

Timing of AppVeyor build steps

I'm driving an AppVeyor build with an appveyor.yml file, in this instance an Angular CLI build. This is a part of my file: test_script: - npm run lint - npm test - npm run e2e - npm run build Those are all npm scripts that delegate actual…
Jeroen
  • 60,696
  • 40
  • 206
  • 339
4
votes
0 answers

Why Angular 6 try to embed all HTML and CSS file into js file (main.js)?

I recently working with Angular 6 and find out that Angular CLI embed all HTML and CSS file into a js file named main.js. I think it's not optimization, after a while you have a big main.js file. In angularjs we had ocLazy that works very simple. I…
Mohamad Shiralizadeh
  • 8,329
  • 6
  • 58
  • 93
4
votes
1 answer

When using angular with scss, how can I see the translated css?

When using scss in an angluar cli app, where I can i see the resulting css that was generated and ng build was complete? relevant section from angular.json "options": { "outputPath": "dist/ClientApp", "index": "src/index.html", "main":…
bitshift
  • 6,026
  • 11
  • 44
  • 108
4
votes
1 answer

Angular6 using system environment variables in environment.ts

In my Angular4 application i ejected the webpack config and used dotenv module to read from a .env file and use those config variables in the application. Since i updated to Angular6 the "ng eject" is depricated and i am using angular-cli. I am…
Ivan Kirchev
  • 133
  • 1
  • 9
4
votes
1 answer

EACCES permission denied angular cli ng build in docker

I get a permissions error when I run ng build --prod --env=prod within a Docker container. I think I'm taking care of all the various npm config settings, and the install is fine. But when I run I get this error: EACCES: permission denied,…
jb44
  • 393
  • 1
  • 6
  • 23
4
votes
1 answer

How to specify published package.json with library publishing in angular 6?

Creating node modules with Angular6 should be quiet easy. The Documentation tells you these steps: ng generate library YOUR-LIBRARY ng build YOUR-LIBRARY --prod cd dist/YOUR-LIBRARY && npm publish This will add for instance a new project inside…
Michael W. Czechowski
  • 3,366
  • 2
  • 23
  • 50
4
votes
0 answers

How to convert an angular cli project to a dot net core project

I have created a project using angular(6) cli now I want to convert it in dot net core project. I have copied all files from angular-cli->src->app to angular.net-core->ClientApp->app. I have installed all required packages including some :- npm…
Sunil Kumar
  • 909
  • 2
  • 17
  • 31
4
votes
3 answers

How to remove dist files in Angular 6?

I want to deploy my angular project i generated dist file in my src folder like this ng build Before deploying I decided to add some functionality to my page : Question Is it posible to update dist files by doing like this? ng serve update /dist…
The Dead Man
  • 6,258
  • 28
  • 111
  • 193