Skip to content

Add support for Angular Material in templates #23

Closed
@mraible

Description

@mraible

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions