Questions tagged [angular2-cli]
124 questions
0
votes
2 answers
How to create project for different versions of Angular 2|4|5|6
In my window 8 system, Angular CLI 6.1.1 has been installed. I want to create projects for Angular2, Angular4, Angular5 nd Angular6. But when I create a project using the below command:
ng new demo
in pachage.json it adds the following code:
…

GAURAV
- 647
- 6
- 18
0
votes
0 answers
ng serve --prod does not include the css from component
When I serve the app for production using ng serve --prod, the compiled version (bundled CSS) does not include the CSS specific to component. I.e. when I look for the classes and definition provided in the styles.scss I was able to see it, but when…

Amit Goel
- 1
- 1
0
votes
1 answer
How do I use global functions from a javascript library inside angular 2
I'm using angular-cli. I have an index.html that has a script (javascript) with some global functions in it. I want to use these functions in several places in my app. I'm fairly new to Angular and typescript and I know very little about type…

gyozo kudor
- 6,284
- 10
- 53
- 80
0
votes
0 answers
component gets load before destroying another in angular 2 router
I am facing issue in Angular 2 router view rendering. any help would be appreciated.
Current Scenario:
While navigating from one view to another, Angular 2 router loads the new view on top of the previous one without destroying the previous…

waleed ali
- 1,175
- 10
- 23
0
votes
1 answer
Angular 2 Cli Issue while ng build --prod but if I use ng build only then it work's fine but size of app is too large
I am having this issue while ng build --prod. it works fine ng build but give issue in ng build --prod
ERROR in Expected 'styles' to be an array of strings.
ERROR in ./src/main.ts
Module not found: Error: Can't resolve…

Yadjosan
- 3
- 4
0
votes
1 answer
Angular 2 css styles
I am writing an angular2 application using angular-cli. I follow the structure like
- global styles are imported/put in styles.scss which is specified in angular-cli.json -> styles: []
- each component will have its own scss
Everything is working…

Huy Nguyen
- 85
- 1
- 3
0
votes
0 answers
Login with Twitter using Angular2
I want to integrate twitter login to my Angular2 Project. I follow the steps mentioned in https://www.npmjs.com/package/ng2-twitter only just changed the api url to "https://api.twitter.com/1.1/users/show.json" instead of…

Manoj Ahuja
- 305
- 4
- 20
0
votes
1 answer
Login with linkedin and get user information in Angular2
I am new to Angular2, I want to integrate linked login functionality and get the currently singed in user information for my Angular2 project.
I have created App in using linkedin developer account and have Client ID and Client Secret and tried…

Manoj Ahuja
- 305
- 4
- 20
0
votes
1 answer
Importing from node_modules in Sass Files (build using ng-cli)
I am using the ng-cli build tool to assemble my Angular2 application.
I am using Sass to style my components. Within these sass files I would like to import some sass content from bootstrap.
I have achieved this by using a Sass @import using a…

jwa
- 3,239
- 2
- 23
- 54
0
votes
0 answers
Support Object.assign in karma/protractor tests
I have installed the latest angular-cli and the application works in a browser however when I run ng e2e the protractor test fails with:
[21:25:53] I/direct - Using ChromeDriver directly...
[21:25:53] I/launcher - Running 1 instances of…

SpliFF
- 38,186
- 16
- 91
- 120
0
votes
2 answers
issue upgrading to new angular/cli
I attempted to upgrade from Angular-cli beta.28 following instructions here: https://github.com/angular/angular-cli/wiki/stories-rc.0-update to the latest angular/cli due to a href overwrite bug...
Now when I run ng --version (to see what version I…

user2524574
- 109
- 2
- 10
0
votes
1 answer
Angular 2 cli project -Socket.io not working
Folks,
I have a angular 2 Cli project. Its a simple chatting application. But for some reasons, server is not receiving/sending message to client. There is no compile error and app works but no socket messaging.
Below is the code snippet from each:…

leo
- 3,045
- 5
- 24
- 23
0
votes
1 answer
A2 CLI project runs locally but not remote after updating
I recently updated my global A2 CLI, as well as an existing project, to:
_ _ _
__ _ _ __ __ _ _ _ | | __ _ _ __ ___ | |(_)
/ _` || '_ \ / _` || | | || | / _` || '__|_____ …

Eric
- 2,061
- 8
- 28
- 37
0
votes
1 answer
Angular 2 - What module bundle am I using
I am building a web app using angular cli with ng new command. However, I have came across a few post talking about if I am using webpack I should do this or if I am using systemJs I should do this... However I do not know which one I am using?…

user172902
- 3,541
- 9
- 32
- 75
0
votes
1 answer
angular2-cli - How to pack some specific ts files into one js file?
I'm working on a small angular2 project that is generated by angular2-cli
Now I need to public my common library (in common folder), and for security reason, I want to pack it into one js file (along with minify source code).
After hours of…

doannx
- 1,250
- 13
- 19