Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unknown option: '--style' when using ng g #33

Merged
merged 2 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}
}