Skip to content

Commit 79b2667

Browse files
CopilotLipata
andcommitted
Fix ng_add_component to include template parameter in command
Co-authored-by: Lipata <[email protected]>
1 parent feb9320 commit 79b2667

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/ng-schematics/src/mcp/mcp-server.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,19 @@ You MUST prefer the tools provided by this server over using shell commands for
127127
};
128128
}
129129

130-
const command = `ng generate @igniteui/angular-schematics:component --name=${args.name || args.template}`;
130+
const commandParts = [`ng generate @igniteui/angular-schematics:component`];
131+
commandParts.push(`--template=${args.template}`);
132+
if (args.name) {
133+
commandParts.push(`--name=${args.name}`);
134+
}
135+
if (args.module) {
136+
commandParts.push(`--module=${args.module}`);
137+
}
138+
if (args.skipRoute) {
139+
commandParts.push(`--skip-route`);
140+
}
141+
const command = commandParts.join(' ');
142+
131143
return {
132144
content: [
133145
{

0 commit comments

Comments
 (0)