Represents the Barcode control
<div id='barcode'/>
let barcode: Barcode = new Barcode({
width:'1000px', height:'500px' });
barcode.appendTo('#barcode');
string
Defines the background color of the barcode.
Defaults to ‘white’
Defines the text properties for the barcode.
Defaults to ”
boolean
Defines the checksum for the barcode.
Defaults to ‘true’
boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
string
Defines the forecolor of the barcode.
Defaults to ‘black’
string
| number
Defines the height of the barcode model.
<div id='barcode'/>
let barcode: Barcode = new Barcode({
height:'1000px', height:'500px' });
barcode.appendTo('#barcode');
Defaults to ‘100’
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
Defines the margin properties for the barcode.
Defaults to ”
Defines the barcode rendering mode.
Defaults to ‘SVG’
Defines the type of barcode to be rendered.
Defaults to ‘Code128’
string
Defines the value of the barcode to be rendered.
Defaults to undefined
string
| number
Defines the width of the barcode model.
<div id='barcode'/>
let barcode: Barcode = new Barcode({
width:'1000px', height:'500px' });
barcode.appendTo('#barcode');
Defaults to ‘100%’
Adds the handler to the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event |
handler | Function |
Specifies the call to run when the event occurs. |
Returns void
Appends the control within the given HTML element
Parameter | Type | Description |
---|---|---|
selector (optional) | string | HTMLElement |
Target element where control needs to be appended |
Returns void
Adding unload event to persist data when enable persistence true
Returns void
When invoked, applies the pending property changes immediately to the component.
Returns void
It is used to destroy the Barcode component.
Returns void
Removing unload event to persist data when enable persistence true
Returns void
Export the barcode as an image in the specified image type and returns it as base64 string.
Parameter | Type | Description |
---|---|---|
exportType | BarcodeExportType |
Defines the format of the barcode to be exported |
Returns Promise
Export the barcode as an image in the specified image type and downloads it in the browser.
Parameter | Type | Description |
---|---|---|
filename | string |
Specifies the filename of the barcode image to be download. |
exportType | BarcodeExportType |
Defines the format of the barcode to be exported |
Returns void
Returns the persistence data for component
Returns any
Returns the module name of the barcode
Returns string
Get the properties to be maintained in the persisted state.
Returns string
Returns the route element of the component
Returns HTMLElement
Handling unload event to persist data when enable persistence true
Returns void
Applies all the pending property changes and render the component again.
Returns void
Removes the handler from the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event to remove |
handler | Function |
Specifies the function to remove |
Returns void
Renders the barcode control with nodes and connectors
Returns void
Dynamically injects the required modules to the component.
Parameter | Type | Description |
---|---|---|
moduleList | Function[] |
? |
Returns void
EmitType<Object>
Triggers if you enter any invalid character.