Creation of Angular Components

Asked

Viewed 66 times

1

I am starting my experiments with Angular (9) using Vscode as IDE. However I am with a doubt (which may be basic), but I have not seen anywhere the explanation for such...

When trying to create a new component ex: "menu" via the command: ng g c menu I realize that the application only creates the archive menu.componentts. How do I get it to create the other files (css, html, and spec.ts)?... as far as I have read, the above command did so by default. What has changed?...

Grateful to all...

Marcelo

1 answer

2

I was able to resolve the issue by editing the "Schematics" session parameters from the.json.

Only removed the parameter "inlineTemplate": true and the creation process came to work by creating for me only the . ts and . html files (as I wanted to)

  "projectType": "application",
  "schematics": {
    "@schematics/angular:component": {
      "inlineTemplate": true,
      "inlineStyle": true,
      "skipTests": true
    },

Browser other questions tagged

You are not signed in. Login or sign up in order to post.