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

Add support for Angular Material in templates #23

Closed
mraible opened this issue Jan 6, 2020 · 1 comment · Fixed by #29
Closed

Add support for Angular Material in templates #23

mraible opened this issue Jan 6, 2020 · 1 comment · Fixed by #29

Comments

@mraible
Copy link
Collaborator

mraible commented Jan 6, 2020

The HTML templates in 1.0.0 use Bootstrap by default. We should add a parameter that allows it to be overridden. This should be possible by using different templates for bootstrap and material. I've done this in @oktadev/schematics using a platform option. You can read it in the schematic and switch templates.

For example, change this line:

const templateSource = apply(url('./files'), [

To this:

const templateSource = apply(url(`./files/${options.platform}`), [

Then add a new property to angular-crud/src/crud-module/schema.json:

"platform": {
  "type": "string",
  "default": "bootstrap"
},

After making these changes (and moving files), you should be able to override the platform and read from ./files/material directory instead. For example:

ng g angular-crud:crud-module hotel --platform=material

Related: ngx-hipster generates a skeleton Angular Material application with login support (for a JHipster backend).

@mraible
Copy link
Collaborator Author

mraible commented Jun 23, 2021

I'm starting work on this now. @manfredsteyer Do you want to save the existing layout in the templates for any reason? I could put them in a "custom" templates directory, or something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant