You can take a look at the package that exists for the angular 1.5 and adapt it to the angle 5: link
Using the source:
link
Create a class for the font :
@font-face {
font-family: "BarcodeInterleaved2of5";
src: url("../fonts/BarcodeInterleaved2of5.ttf") format("truetype");
}
.barcodei2of5 {
font-family: "BarcodeInterleaved2of5";
font-size: 200px;
}
Use the function that generates the sequence interpreted by the font :
function generateBarcodeSequence(barcode) {
var barcodeSequence = "";
if (barcode.length > 0 &&
barcode.length % 2 === 0) {
for (var index = 0; index < barcode.length; index = index + 2) {
var item = Number(barcode.substr(index, 2));
var charCode;
if (item <= 49) {
charCode = item + 48;
}
else {
charCode = item + 142;
}
barcodeSequence = barcodeSequence + String.fromCharCode(charCode);
}
barcodeSequence = "(" + barcodeSequence + ")";
}
return barcodeSequence;
}
Finally you encapsulate in an Angular 5 component and use it on your screens.