Questions tagged [angular-cli-v7]

Usage This tag is intended for questions which ask about angular-cli Please take note that you should use the angular-cli tag for Angular CLI related questions.

The Angular CLI is a tool to initialize, develop, scaffold and maintain Angular applications

Usage:

  • This tag is intended for questions which ask about Angular CLI issues or usage.
  • Angular related questions should use the angular tag.

Asking a question

  • Mention the versions of Angular and Angular CLI that you're using.
  • Reduce your issue to a small example Post a reduced working code on stackblitz.com.

  • If there's a bug (or some unintentional behavior), try to troubleshoot the problem. (If it's a bug report, please create a new issue at Angular CLI's Github repository instead.)

Learn more

To learn more about Angular CLI, visit the following resources to help you get started:

95 questions
0
votes
0 answers

Is there a way to import scss files automatically when generating a new component?

I have 4 scss files that i use in the majority of my components, i would like if the cli could put the imports inside of the scss file automatically when i do an ng generate component. Is this possible? I've done some research on google but have had…
grahamama
  • 23
  • 4
0
votes
1 answer

Updated Angular from 5 to 7 and tried running test with command ng test . after this i am getting "no spec found"

Updated angular from 5 to 7 after that tried running test with command ng test and getting error "no spec found" and Chrome 73.0.3683 (Linux 0.0.0): Executed 0 of 0 ERROR (0.029 secs / 0 secs). Can anyone help me how to fix this? i have tried all…
0
votes
0 answers

Preconfigure a default folder for Angular Component Generation (ng g c) and omit folder name in ng command

Is there any way to specify a default folder name in a configuration file like angular.json, so that all developers running the cli-command ng g c MyComponent --skipTests without folder name will create components in this preconfigured folder (e.g.…
Ajay Nishad
  • 361
  • 1
  • 3
  • 10
0
votes
2 answers

copying assets shared by all configurations

In my project build configuration I have the following assets declaration : "assets": [ "src/favicon.ico", "src/assets", "src/assets/fonts", "src/images", "src/web.config" …
Sam
  • 13,934
  • 26
  • 108
  • 194
0
votes
0 answers

Does Angular define a directory structure for organizing assets by environment?

Angular defines app and assets directories that seem to contain source and assets for all environments (development, production, etc.). The environments directory is for configuration, and is being replaced by configurations. If there are assets or…
Trevor Karjanis
  • 1,485
  • 14
  • 25
0
votes
0 answers

Can't resolve 'fs' Angular upgrade from 5.2 to 7

I updated my angular CLI from 1.7 to 7~, and I am getting this error. ERROR in ./node_modules/edit-json-file/lib/index.js Module not found: Error: Can't resolve 'fs' in…
Aijaz
  • 680
  • 15
  • 42
0
votes
0 answers

Angular upgrade CLI unexpected token at position 0

I am following the upgrade guideline of angular. And have done the following steps npm install -g @angular/cli, npm install @angular/cli, ng update @angular/cli The first two steps went fine, but at the last step, I am getting unexpected token at…
Aijaz
  • 680
  • 15
  • 42
0
votes
1 answer

Angular 7 ng new Error: Schematic input does not validate against the Schema: {"name":"test"} Errors: Data path "" should have

I just upgraded to Angular 7 and I get the following error when trying to create a new project: Schematic input does not validate against the Schema: {"name":"test"} Errors: Data path "" should have required property 'version'. Angular CLI:…
Paco Zevallos
  • 2,165
  • 7
  • 30
  • 68
0
votes
2 answers

Function calls are not supported in decorators but 'Animations' was called

I have an Animation class given below: import { trigger, state, style, transition, animate } from '@angular/animations'; export class Animations { constructor() {} animate = animate('.5s cubic-bezier(0.68, -0.55, 0.265, 1.55)'); side() { return…
Tejashri Patange
  • 329
  • 2
  • 6
  • 24
0
votes
1 answer

angular2+: Toggle between click and mouseenter

I'm building a component for my app menu. The sub-menus needs to be opened on mouseenter when the menu is in compact mode, and on click when on wide mode (both are css classes for the "nav" element inside the component).
glng
  • 37
  • 6
0
votes
4 answers

Cannot execute method of a component from another in angular 7

I'm trying to call a method toggleSidebar() of the SidebarComponent from the HeaderComponent trough the method callToggleSidebarOnToggleSidebarBtn() but I get some error that I don't understand. How to use method of a component from another ? I…
0
votes
1 answer

froalaEditor.file.beforeUpload Event not firing

I'm attempting implement the custom file upload feature of the Angular Froala WYSIWYS Editor. I've pasted my configuration options below. In the console, I can see that both the froalaEditor.file.beforeUpload and froalaEditor.file.inserted events…
Evan French
  • 77
  • 1
  • 10
0
votes
1 answer

Getting installation error while installing firebase in angular project

In my angular project I have to use firebase SDK for that I have to install firebase into my project. I tried to install it in my angular project using command "npm install angular-firebase --save". It throws this error: > grpc@1.10.1 install…
salman94
  • 60
  • 8
0
votes
2 answers

What are the possible causes for my application having slow built on ng serve?

I am having a very slow compiling and outputting result on changes. My current ng serve runs an update after a simple text change in a file in around 20 seconds. (Actually compilation time is short, within 3 - 5 seconds), the other 15 seconds is the…
Brian Ruchiadi
  • 331
  • 1
  • 13
  • 29
0
votes
2 answers

Auto declare components, path in routing module at the time of create a new components Angular 7

for example if we create any component from angular-cli (ng g component compName ) it is automatically declaring https://i.stack.imgur.com/KiXzj.jpg same way i want to declare automatically in routing at the time of component creation, like this…