Schematics is a workflow tool for the modern web; it can apply transforms to your project, such as create a new component, or updating your code to fix breaking changes in a dependency. Or maybe you want to add a new configuration option or framework to an existing project. Angular schematics are part of angular-cli and are used to generate components, modules, pipes, etc.
Questions tagged [angular-schematics]
179 questions
0
votes
0 answers
Is there a way to inherit Schema of custom schematic?
Using Angular Schematics, I would like to build a schematic which inherits the schema from a "Base" schematic (which is private and hidden, so it cannot be executed from CLI).
So when I run:
schematics @my-schematic:foo
I would like "foo"…

user2297996
- 1,382
- 3
- 18
- 28
0
votes
1 answer
Angular Material Component schematics
Whenever I run this command ng generate @angular/material:navigation dashboard the terminal shows this
The 'path' option in '__\Desktop\machine test\employee\node_modules@angular\material\schematics\ng-generate\navigation\schema.json' is using…

munna
- 1
- 1
0
votes
1 answer
Angular material : Navigation schematics doesn't work
I want to create angular material navigation schematics.
when i run
ng generate @angular/material:navigation command it gives error.
The 'path' option in 'C:\Users\Pradeepa…
0
votes
1 answer
Error: Schematic "rest" cannot resolve the factory
function looks like this:
I am using first time nestjs for generators, it seems like i have some issue in collection.json
export function application(options: any) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
return (_tree:…

Krish909
- 77
- 2
- 12
0
votes
1 answer
What is the replacement for askConfirmation in Angular 14 Schematics?
How can I accomplish this in angular 14?
It seems askConfirmation is no longer exported from…

KrisSodroski
- 2,796
- 3
- 24
- 39
0
votes
1 answer
Angular Material : Material Navigation does not work
I want to create a navigation schematics with this command :
ng generate @angular/material:navigation
But it gives me an error as below :
The 'path' option in…

Rouatbi Daly
- 76
- 1
- 7
0
votes
0 answers
Angular schematics, find all matches files and save to one
Is it possible to make a custom Angular schematic that finds all the JSON files in a project, reads them and creates one JSON file?
My each component contains a json file with the translation. I would like to find all such files, read their contents…

JorgenDev
- 3
- 2
0
votes
0 answers
Angular schematics: Cannot read properties of undefined (reading 'match')
I am creating a library containing schematics. It compiles, but when I try to use it, after prompting all requested inputs, I obtain this error:
Cannot read properties of undefined (reading 'match')
This is my index.ts
import {
Rule, Tree,
…

Igino Boffa
- 686
- 1
- 9
- 21
0
votes
1 answer
Angular schematics error when using external schematic ng-new, version required
Im trying to create a schematic that uses the angular ng-new as first call and my other schematic that adds a prettier file to the new project. When i execute the command i get the error
Data path "" must have required property 'version'.
So i…

Iván Jiménez Luque
- 11
- 3
0
votes
1 answer
Error when generating new angular app in Nx workspace
We're getting the following error when trying to generate an Angular app in an Nx workspace following an upgrade from Angular/Nx 12->14:
SchematicsException [Error]: Project "name-of-app" does not exist.
The command we're using is:
npx nx g…

William Neely
- 1,923
- 1
- 20
- 23
0
votes
1 answer
How to delete / skip directory using Angular schematics?
I have some files in my schematics template which should be generated only when a certain input options is present. e.g: db==true
Is there a way to skip these directories / files?
One solution is to remove them from the source using tree.delete().…

user2297996
- 1,382
- 3
- 18
- 28
0
votes
2 answers
Angular Schematics - Create Interface/Model from JSON Response
As I am trying to automate my Development process, I would like to create a Ts/Angular Interface based on a JSON response.
Let‘s say that I am getting a response which looks like this
{"name":"John", "age":30, "car":“Honda“}
The Final outcome should…

feelsgoodman95
- 3
- 2
0
votes
1 answer
"Unknown argument" when creating a model with angular-crud
I'm trying to setup the package 'angular-crud' in my Angular 14 project.
Followed the README instructions at https://www.npmjs.com/package/angular-crud, including creating a folder under src/app with the name of the model and copying a 'model.json'…

zeroquaranta
- 392
- 4
- 16
0
votes
1 answer
Unable to navigate inside a Tree in angular devkit schematics
I want to create a CLI based on schematics to improve projects creation for my job and I want to scaffold an Angular Application AND an Angular Library in one command. So I tried to use externalSchematic and it works perfectly for the application…
0
votes
1 answer
Angular schematics - how to set a constant name
I'm trying to create schematics to create an Angular service with a constant name that should not be changed by the user.
I've removed all of the references to the 'name' variable but when I try to use it I'm getting an error -
Option "name" is not…

Shlomy Z
- 301
- 2
- 14