@dom
def chart(show: Var[Boolean]) = {
if(show.bind) {
<canvas id="chartCanvas"><canvas>
}
}
How can I init the canvas with some chart library like chartjs when it is loaded to dom ?
@dom
def chart(show: Var[Boolean]) = {
if(show.bind) {
<canvas id="chartCanvas"><canvas>
}
}
How can I init the canvas with some chart library like chartjs when it is loaded to dom ?
Copyright © 2021 Jogjafile Inc.
Solution 1
Solution 2
You can create a custom SingleMountPoint, and put the initialization code in the overriden
mountmethod: