How to rename a component in Angular CLI?
Is there any shortcut to rename a component with the Angular CLI other than manually editing all the component files such as folder name, .css, .ts, spec.ts and app.module.ts? 11 Answers 11
Is there any shortcut to rename a component with the Angular CLI other than manually editing all the component files such as folder name, .css, .ts, spec.ts and app.module.ts? 11 Answers 11
I have started to learn Angular but I note that powershell in Windows gives me an error whenever I make an angular command like: ng new new-app or ng serve this is the error what I got: ng : File C:\Users\< username >\AppData\Roaming\npm\ng.ps1 cannot be loaded because running scripts is disabled on this system. For … Read more
Lint error message: src/app/detail/edit/edit.component.ts[111, 5]: for (… in …) statements must be filtered with an if statement Code snippet (It is a working code. It is also available at angular.io form validation section): for (const field in this.formErrors) { // clear previous error message (if any) this.formErrors[field] = ”; const control = form.get(field); if (control … Read more
I tried using “ng destroy component foo” and it tells me “The destroy command is not supported by Angular-CLI” How do we properly delete components with Angular CLI? 14 Answers 14
We want to use bootstrap 4 (4.0.0-alpha.2) in our app generated with angular-cli 1.0.0-beta.5 (w/ node v6.1.0). After getting bootstrap and its dependencies with npm, our first approach consisted in adding them in angular-cli-build.js: ‘bootstrap/dist/**/*.min.+(js|css)’, ‘jquery/dist/jquery.min.+(js|map)’, ‘tether/dist/**/*.min.+(js|css)’, and import them in our index.html <script src=”https://stackoverflow.com/questions/37649164/vendor/jquery/dist/jquery.min.js”></script> <script src=”vendor/tether/dist/js/tether.min.js”></script> <link rel=”stylesheet” type=”text/css” href=”vendor/bootstrap/dist/css/bootstrap.min.css”> <script src=”vendor/bootstrap/dist/js/bootstrap.min.js”></script> This worked … Read more
I’m using Angular 2+ and Angular CLI. How do I add font-awesome to my project? 29 Answers 29
Running windows 7 Professional 32bit. I tried running npm install -g angular-cli both under normal or admin. I also tried adding it to the Enviorment Variables under PATH: (C:\Users\Administrator\AppData\Roaming\npm\node_modules\angular-cli\bin\ng) , with no success also. What am i doing wrong? 51 Answers 51 I solved this problem in accordance with the figure: run in cmd npm … Read more
I am using Angular 4 with Angular CLI and I am able to create a new component with the following command. E:\HiddenWords>ng generate component plainsight But I need to generate a child component inside plainsight. Is there a way to do it with Angular CLI? 21 Answers 21
I’m new to Angular and I’m coming from the Ember community. Trying to use the new Angular-CLI based off of Ember-CLI. I need to know the best way to handle SASS in a new Angular project. I tried using the ember-cli-sass repo to see if it would play along since a number of core components … Read more
What is the best method to bundle Angular (version 2, 4, 6, …) for production on a live web server. Please include the Angular version within answers so we can track better when it moves to later releases. 12 Answers 12