Skip to content

Commit 768d0d0

Browse files
authored
fix: set default route (#1422)
1 parent feebb55 commit 768d0d0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.vscode/launch.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@
160160
"outFiles": ["${workspaceFolder}/**/*.js"],
161161
"args": [
162162
"add",
163+
"--template=grid",
164+
"--name=MyGridComponent"
163165
]
164166
},
165167
{

packages/cli/lib/templates/IgniteUIForReactTemplate.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export class IgniteUIForReactTemplate implements Template {
6666

6767
public registerInProject(projectPath: string, name: string, options?: AddTemplateArgs, defaultPath = false) {
6868
if (!options.parentName) {
69-
return;
69+
options.parentName = "app";
70+
}
71+
if (!options.parentRoutingModulePath) {
72+
options.parentRoutingModulePath = "src/app/app-routes.tsx";
7073
}
7174

7275
if (this.projectType === "igr-es6") {

0 commit comments

Comments
 (0)