Skip to content

Commit

Permalink
Fix Unknown option: '--style' when using ng g (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Raible authored Oct 5, 2021
1 parent 22c9b61 commit b565cf7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ This library supports Bootstrap, Angular Material, and Paper Dashboard templates
- `--style material`: forces Angular Material templates
- `--style paper-dashboard`: forces Paper Dashboard templates
You need to use the Schematics CLI to pass in this option:
For example:
```shell
npx @angular-devkit/schematics-cli angular-crud:crud-module note --style bootstrap
ng g angular-crud:crud-module note --style bootstrap
```

Paper Dashboard is the default if you don't specify a `--style` parameter and no Bootstrap or Angular Material dependencies are found in `package.json`.
Expand Down
16 changes: 4 additions & 12 deletions angular-crud/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export class <%= classify(name) %>Filter {<% for (let field of getFilterFields(model)) { %>
<%=field.name%> = '';<% } %>
<%=field.name%> = '';<% } %>
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export class <%= classify(name) %>Filter {<% for (let field of getFilterFields(model)) { %>
<%=field.name%> = '';<% } %>
<%=field.name%> = '';<% } %>
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export class <%= classify(name) %>Filter {<% for (let field of getFilterFields(model)) { %>
<%=field.name%> = '';<% } %>
<%=field.name%> = '';<% } %>
}
4 changes: 4 additions & 0 deletions angular-crud/src/crud-module/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
"type": "string",
"default": "model.json",
"description": "Model describing the crud form"
},
"style": {
"type": "string",
"default": "paper-dashboard"
}
}
}

0 comments on commit b565cf7

Please sign in to comment.