1.0.4 • Published 6 years ago

@petkit/ngx-material-demo v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Angualr Material Demo Component

demo

example

Installation

npm install --save-dev @petkit/ngx-material-demo

This package depend on @petkit/ngx-highlight to highlight code.

Usage

Import Module

import {
  MatDemoModule,
} from '@petkit/ngx-material-demo';
@NgModule({
  imports: [
    MatDemoModule.forRoot({
      // http request base url(Notice: It's a absolute url)
      baseUrl: '/assets/demo'
    })
  ],
})

HTML

<ngx-mat-demo path="button" title="Button">
  <button mat-button>Button</button>
</ngx-mat-demo>

The value of path will be translated to

  • /assets/demo/button.component.html
  • /assets/demo/button.component.ts
  • /assets/demo/button.component.scss

You can assign value to suffixes, but .component will always add to all suffixes.

MatDemoModule.forRoot({
  baseUrl: '/assets/demo',
  suffixes: ['html', 'ts', 'css']
})

License

MIT

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago