Skip to content

Commit

Permalink
fix(page): dasherize route path
Browse files Browse the repository at this point in the history
Fixes #48
  • Loading branch information
imhoffd committed Dec 19, 2018
1 parent 2e075ae commit e32e77b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion schematics/page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function addRouteToNgModule(options: PageOptions): Rule {

const relativePath = buildRelativePath(module, pagePath);

const routePath = options.routePath ? options.routePath : options.name;
const routePath = strings.dasherize(options.routePath ? options.routePath : options.name);
const routeLoadChildren = `${relativePath}#${strings.classify(options.name)}PageModule`;
const changes = addRouteToRoutesArray(source, module, routePath, routeLoadChildren);
const recorder = host.beginUpdate(module);
Expand Down
3 changes: 1 addition & 2 deletions schematics/page/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@
},
"routePath": {
"type": "string",
"description": "path the route should be",
"description": "The path to use for the route of the page",
"default": ""

}
},
"required": []
Expand Down

0 comments on commit e32e77b

Please sign in to comment.