I am working in a angular4
project where I had used ngx-slimscroll
which has the tag with attribute as given below
<perfect-scrollbar [config]="configForScroll"></perfect-scrollbar>
.
Now, here my requirement is to create <perfect-scrollbar>
element dynamically using document.createElement() function which I have done successfully.But, on setting the attribute as [config] I am getting error as
Uncaught DOMException: Failed to execute 'createAttribute' on 'Document': The qualified name provided ('[config]') contains the invalid name-start character '['. So, is there any way to set this kind of attribute as shown in below code
var patt = document.createAttribute("[config]");
patt.value = "configForScroll";
Please find me a way to fix it. Thanks in advance