Questions tagged [angular2-cli]

124 questions
9
votes
2 answers

Angular 2 cli integration in visual studio 2015

I am trying to create an angular 2 application in visual studio 2015 using angular2 cli setup. I have done the following steps to setup the project Execute the following command that installs the cli npm i -g angular-cli Execute the following…
Tom
  • 8,175
  • 41
  • 136
  • 267
8
votes
3 answers

Angular2 - Executing e2e tests in different environments

I am new to Protractor. I have developed few tests cases to accomplish the end to end testing. These test cases works fine in all 3 different environments that we have : dev, testing and production. But I need to change Angular application URL in…
Sameer K
  • 799
  • 1
  • 7
  • 26
8
votes
3 answers

How to add SockJS into Angular 2 project?

I use angular-cli to generate a new project. Now I want to add socketJs to the project, but keep getting errors in browser console: GET http://localhost:4200/url-parse 404 (Not Found) GET http://localhost:4200/inherits 404 (Not Found) Unhandled…
janetsmith
  • 8,562
  • 11
  • 58
  • 76
6
votes
2 answers

Angular 2 iframe on website

Is it possible to launch angular2 cli 4.0 into an iframe on a website, in order to have a preview of angular2 components? I would be grateful for an answer to this question.
Adrian Sawicki
  • 590
  • 5
  • 22
6
votes
2 answers

Angualr2 AngularCLI App cannot find HTML files in node_modules library

I have a Angular2 Angular-CLI app which is consuming a custom library installed via NPM (node_modules folder). My Angular2 app can located the custom library components at design time. However, when serving the app via ng serve, the app errors at…
Tom Schreck
  • 5,177
  • 12
  • 68
  • 122
5
votes
3 answers

Angular Production Build is taking about 1.5 GB of memory and still runs Out Of Memory

Angular2 cli Project Production Build [ng build -prod] getting struck on 92% and getting error message like, running out of heap memory. Is there any solution for it? Project consists of huge number of components. Normal build is working fine [ng…
Roshin Thomas
  • 123
  • 1
  • 2
  • 12
5
votes
2 answers

Generate new component while NG Live Development Server is running?

I created an angular2 project using angular-cli. Project is working fine. I used ng serve command to run it locally for development. Below is the snapshot of CLI after running the project: Now I want to create a new component using ng generate…
awebartisan
  • 1,424
  • 16
  • 27
5
votes
2 answers

Configure history.pushState for Angular 2

My Angular 2 application uses the default HTML 5 history.pushState location strategy. How do I configure a server with history.pushState so browser refreshes and browser URLs do not generate 404s? For example, the Tour of Heroes application has a…
Jan Nielsen
  • 10,892
  • 14
  • 65
  • 119
5
votes
1 answer

Experimental decorators warning VSCODE

I'm working on an Angular2-Typescript application. I've generated the project with angular-cli as follows: ng new myApp but when I create a new component, a warning appears on @Component tag. I've tried to solve following this post: Experimental…
4
votes
0 answers

Is there a way to work with Angular2 CLI and fontgen-loader?

I'm kinda new to angular2 , webfonts and webpack. Many people recommended me to work with the Angular2 CLI - which is very convenient. But now, I need to work with webfonts and (other) many people told me to work with…
mikiyakim
  • 51
  • 1
  • 3
4
votes
2 answers

Cannot find module './models/config'

Updating my Angular 2 CLI project from 1.0.0-beta.11-webpack.2 to 1.0.0-beta.11-webpack.8 according to instructions: npm uninstall -g angular-cli npm cache clean npm install -g angular-cli@webpack resulted in…
Jan Nielsen
  • 10,892
  • 14
  • 65
  • 119
4
votes
3 answers

TypeError: Cannot read property 'directoryExists' of undefined

Updating my Angular 2 CLI project from 1.0.0-beta.11-webpack.2 to 1.0.0-beta.11-webpack.8 via ng init, and running ng serve results in the following error: ** NG Live Development Server is running on http://localhost:4200. ** 10% building modules…
Jan Nielsen
  • 10,892
  • 14
  • 65
  • 119
4
votes
1 answer

Who is the #each scripts.polyfills coming from?

I have generated a angular 2 application with the angular 2 CLI. In the index.html file is stuff like: {{#each scripts.polyfills}} {{/each}} When the application is build with the CLI command 'ng build'…
Pascal
  • 12,265
  • 25
  • 103
  • 195
3
votes
2 answers

Location class from @angular/common doesn't work in unit tests

For some reason Location.normalize() and other functions doesn't return correct response when I run tests: import { Router } from '@angular/router'; import { Location } from "@angular/common"; import { TestBed, async, tick } from…
3
votes
5 answers

Error: EPERM Unable to install @angular/cli

I have tried to install angular cli with latest version of node as you mentioned. But it is unsuccessful. I have tried it with admin user only FYI- I have tried it on another machine freshly there also it says the same OS: windows7 64 node…
1
2
3
8 9