# Core card Snippet
To use core-card-snippet
component, import CardSnippetModule
to the respective NgModule
.
# Requirements
import { CardSnippetModule } from ''@core/components/card-snippet/card-snippet.module';
...
...
@NgModule({
declarations: [
...
],
imports: [
...
CardSnippetModule
],
providers: []
})
# Usage
Example :
<core-card-snippet [snippetCode]="customVariable">
<span class="card-snippet-title">Title</span>
<div class="card-snippet-body">
Body
</div>
</core-card-snippet>
import { snippetCode } from '@core/components/card-snippet/card-snippet.component';
...
public customVariable: snippetCode = {
html: `
<p> Your HTML code here...</p>
`,
ts:`
your typescript code here...
`,
scss:`
your scss here...
`,
json:`
Json code here...
`
};
# API
# Component
Name | Selector | Input | Description |
---|---|---|---|
CoreCardSnippetComponent | core-card-snippet | snippetCode Type: snippetCode | Create **HTML |
# Property
Property | Class | Description |
---|---|---|
Title | .card-snippet-title | To add Title to the core-card-snippet component. |
Body | .card-snippet-body | To add Body to the core-card-snippet component. |
You can check the demo on this (opens new window) page.