183 questions
0
votes
0
answers
15
views
Implementation of custom Angular schematics inside a project
I have an Angular 19 project and would like to add some schematics to it. Since these will depend on project components, such as src/shared/*, I don't see a reason to create a separate project as an ...
1
vote
0
answers
38
views
Ngrx action group: automatic way to rewrite old Actions
I have over 800 Actions in my project written in the old form:
export const GetAction = createAction(
'[BOOK] GET',
props<{
filter: BookFilterModel,
}>(),
);
export const ...
1
vote
0
answers
75
views
Can Nx or Angular Schematics support global path aliases in project.json for all keys requiring relative paths, such as $schema?
In our current workflow, in Nx Monorepo, we are developing VSCode extensions that automate the creation and configuration of new (e.g. Angular) apps based on templates located in various ...
0
votes
1
answer
154
views
error NG8002: Can't bind to 'owlDateTimeTrigger' since it isn't a known property of 'input'
HI i need to add owlDateTimeTrigger in angular 16 microfrontent but it show error. please check the below screenshot.
Code:
<ng-template #childtemplateSheduleTime let-data>
<input [(ngModel)]...
1
vote
1
answer
118
views
addImportToModule returns empty array of changes
I'm trying to use angular schematics to add imports to NgModule. I'm using Angular 16.2.5. Here's the code of the logic:
import { addImportToModule, insertImport} from '@schematics/angular/utility/ast-...
4
votes
1
answer
4k
views
How to perform standalone migration in multi-workspace (with Angular schematics)
In a multi-project Angular repo, I could not manage to get the @angular/core:standalone-schematics to work (this allows an automatic conversion of module-based components to standalone components).
...
1
vote
2
answers
1k
views
How to use Angular Schematics not published but in project direclty
I want to create an Angular Schematics to create some components and make it easier to develop my application. The problem is that i don't want to publish it, i want to use it "as it is" in ...
1
vote
0
answers
22
views
How to print help form Schematics?
Is there a built-in method for printing formatted CLI help message using Angular Schematics. I'm thinking of something something like Yargs would produce, for example.
schematics @my-schematic --help
...
0
votes
1
answer
239
views
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\...
0
votes
1
answer
118
views
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 @...
0
votes
1
answer
700
views
Angular Material : Material Navigation does not work
I want to create a navigation schematics with this command :
ng generate @angular/material:navigation <component-name>
But it gives me an error as below :
The 'path' option in '...\node_modules@...
0
votes
1
answer
640
views
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 &...
15
votes
4
answers
36k
views
Angular 14: Error: A collection and schematic is required during execution
I am trying to learn angular. I installed the lastest version and created an app called test using ng new test command.
Then I opened the app in visual studio code. In the terminal I entered the ...
0
votes
2
answers
193
views
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"...
1
vote
1
answer
502
views
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 ...
2
votes
0
answers
275
views
Add to bootstrapApplication in Angular 14 schematic
With Angular 14 and standalone components, the app.module.ts can go away and instead something like this goes in main.ts instead:
bootstrapApplication(AppComponent, {
providers: [
...
3
votes
0
answers
522
views
Angular Schematic - Change execution scope or directory after calling the ng-new schematic
I have an angular schematic where I create a new project, then call ng-add to add a package to that new project.
It looks like this:
export function createProject(options) {
return () => {
...
6
votes
0
answers
322
views
Is there a way to use Nrwl Nx's AST utils for Angular in Nx >13
I wrote a few generators that were working until I did a recent migration. I was importing and using Nrwl AST utils using import paths like:
import { addImportToModule } from '@nrwl/angular/src/utils/...
0
votes
1
answer
1k
views
Updating from Angular11 to 13 generates error Data path "" must NOT have additional properties(styleext)
I have checked out the following prescriptions for this problem and they did not resolve my issue. I upgraded from angular 11 to 13 following the procedure on the Angular official website which went ...
0
votes
1
answer
618
views
How to show 'Angualar Schematic...' entry in project popup menu?
I have an angular project where the Angular menu items are missing.
In the settings it seems to be configured correctly:
But in the pop-up menu (from the project-view) the entries are missing:
Note: ...
1
vote
1
answer
428
views
What is packageGroup in ng-update object?
I am doing analysis around ng-update command in angular to run custom logic after ng-update.
I came across an ng-update object's property packageGroup of which I did not find detailed explanation.
...
0
votes
1
answer
220
views
How to change variable at module with angular schematics?
Just like addImportToModule or addProviderToModul,my module file look like this:
const EXAMPLES = [
ButtonIconExampleComponent,
ButtonTextExampleComponent,
ButtonDashedExampleComponent
]
@...
3
votes
1
answer
594
views
How to remove empty folders or delete directories in a tree using Angular Schematics?
I am trying to delete a folder with files using Tree.delete. Unfortunately there's an error if you're trying to delete a directory. So, I created a function that recursively removes the files using ...
3
votes
2
answers
949
views
Angular Schematics Skip "implements OnInit"
I've found plenty about how to setup my schematic file to skip certain things (like the spec file) when creating a component using ng generate but what I can't find anywhere is how to not include the ...
0
votes
1
answer
264
views
Issue publishing and installing standalone schematic package to Angular project
My goal is to publish a custom Angular schematic package to my company's private npm registry for other devs to leverage. Here's what I've accomplished so far:
Created separate schematic project ...