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
1 answer

ng build -w # ignore non-codebase compilation errors

I am using AngularCLI (ng) version 1.6.7. I am getting some compilation from internal libraries that I don't control, for example: https://github.com/angular/material2/issues/9816 ERROR in…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
4
votes
2 answers

Angular - Load Production chunk files failed after deploy

I have clients that have the browser open all day so after I make a deployment they see the application broken and they need to reload the page to fix it. The server failed to load a chunk file because of the NO-CACHE hash added by @angular/cli…
Eugenio Valeiras
  • 980
  • 1
  • 9
  • 30
4
votes
1 answer

Http.post not working when 'application/json' set in header in Angular4 cli

I am beginner in the Angular CLI, I have used the login api:'http://localhost/appointjobs/index.php/admin_api/index' using http.post but, I didn't get the post data in server side(codeigniter/php) when set 'content-type:application/json'. Below…
Mandip Vora
  • 309
  • 1
  • 2
  • 14
4
votes
2 answers

ng-boostrap not workingIf 'ngb-xx' is an Angular component, then verify that it is part of this module

Getting the message If 'ngb-xx' is an Angular component, then verify that it is part of this module for every angular bootstrap components that i try Setup process npm install angular-cli ng new project npm install npm install --save…
Pascal
  • 2,377
  • 3
  • 25
  • 40
4
votes
1 answer

Angular CLI - change folder for source code

I want to start new Angular 5 project, but I need that my code will be in another folder than configuration files. Is possible to do that in cli commands? For example here is my folder structure: -/root -/src/main/java -/pom.xml After generation…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
4
votes
1 answer

"live reload" do not see new files that were added to assets folder after "ng serve" was executed

i have: angular2 application controlled by angular-cli ng serve for dev purposes and ng build for production some microservice which generates some images and copy them to static folder, in current situation - to ./src/assets…
Xenobyte
  • 173
  • 10
4
votes
1 answer

Angular Router Navigation doesnt remove previous component css

I am new to angular and build two component in my first angular app. In first component i put a click on button to navigate to second component. I m using below code for navigation : this.router.navigate(['../secondcomponent/'], { relativeTo:…
Feroz Siddiqui
  • 3,840
  • 6
  • 34
  • 69
4
votes
0 answers

Angular - delay between constructor and ngOnInit method of 10-12 seconds

I have encountered strange issue which is related to the component creation and passing data into it. For staters, I am using: Angular CLI: 1.6.4 Angular: 5.1.0 Issue is as follows: in parent component I am fetching data, creating DataService…
koncek
  • 331
  • 2
  • 10
4
votes
1 answer

webpack live reload is not working with @angular/cli

I bought a template that uses angular, followed the setup steps but on making changes there was no live reloading. The project uses webpack too
Sigu Magwa
  • 546
  • 5
  • 18
4
votes
7 answers

ng new gives dryRunSink.(...).concat is not a function error

I am trying to create a new angular project. I followed the steps mentioned in this site. https://github.com/angular/angular-cli When I try to create a new project using ng new command, I get error. E:\Code\> ng new some-name Error:…
fhnaseer
  • 7,159
  • 16
  • 60
  • 112
4
votes
4 answers

Running ng test and ng serve together

I am a relative newbie in Angular 5, and am trying to setup a development setup for my team to build an Angular 5 application. What I would like is for the team to be able to run linting & unit tests every time a change is made, and then serve up…
4
votes
3 answers

font-awesome fonts are not loaded into angular project

I've been using angular 5 for a while now and it seems that I can't load any font-awesome icons into my built project. I followed the steps thoroughly as mentioned in the link below. https://www.npmjs.com/package/angular-font-awesome It appears that…
4
votes
0 answers

Angular-cli: Logic in module file depending on environment

I am trying to make my app concious of dev and prod mode and am using the built in mechanism in the Angular CLI, which substitutes the environment.ts file depending on the currently used alias. This works fine for me for switching conts values (like…
4
votes
2 answers

Different assets in cli config for ng serve and ng build [Angular 5]

Is possible to use different assets array when i use ng build? "assets": [ "assets", "favicon.ico", { "glob": "**/*", "input": "../externalDir", "output": "./app/", "allowOutsideOutDir": true } ] In my case when i use ng…
Verri
  • 1,580
  • 19
  • 22
4
votes
1 answer

Angular 5.1.1 infinite refresh loop after set proxy for signalr?

I'm working with Angular 5.1.1 and @angular/cli ^1.6.1. I want to use Asp.Net Core SignalR. So I have the following proxy setting: const PROXY_CONFIG = [ { context: [ "/api", "/Temp", "/Upload", "/notificationHub", …
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
1 2 3
99
100