Skip to content

Commit b565cf7

Browse files
author
Matt Raible
authored
Fix Unknown option: '--style' when using ng g (#33)
1 parent 22c9b61 commit b565cf7

File tree

6 files changed

+13
-17
lines changed

6 files changed

+13
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ This library supports Bootstrap, Angular Material, and Paper Dashboard templates
109109
- `--style material`: forces Angular Material templates
110110
- `--style paper-dashboard`: forces Paper Dashboard templates
111111
112-
You need to use the Schematics CLI to pass in this option:
112+
For example:
113113
114114
```shell
115-
npx @angular-devkit/schematics-cli angular-crud:crud-module note --style bootstrap
115+
ng g angular-crud:crud-module note --style bootstrap
116116
```
117117

118118
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`.

angular-crud/package-lock.json

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export class <%= classify(name) %>Filter {<% for (let field of getFilterFields(model)) { %>
2-
<%=field.name%> = '';<% } %>
2+
<%=field.name%> = '';<% } %>
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export class <%= classify(name) %>Filter {<% for (let field of getFilterFields(model)) { %>
2-
<%=field.name%> = '';<% } %>
2+
<%=field.name%> = '';<% } %>
33
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export class <%= classify(name) %>Filter {<% for (let field of getFilterFields(model)) { %>
2-
<%=field.name%> = '';<% } %>
2+
<%=field.name%> = '';<% } %>
33
}

angular-crud/src/crud-module/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
"type": "string",
4747
"default": "model.json",
4848
"description": "Model describing the crud form"
49+
},
50+
"style": {
51+
"type": "string",
52+
"default": "paper-dashboard"
4953
}
5054
}
5155
}

0 commit comments

Comments
 (0)