I am trying to extend a JavaScript library that also uses a template file per some of the examples documented at Extending Bokeh — Bokeh 2.4.2 Documentation in bokeh server. Currently I am having trouble with the template file syntax. As an example I simply copied the contents of the three example files for making a custom widget into main.py, extensions_ion_range_slider.coffee, and extensions_ion_range_slider_template.ts all located in the same folder. The main.py file was adjusted slightly to be run with the bokeh server using curdoc().add_root(layout) instead of show(layout).
Running the code with bokeh serve ./ works, but when navigating to the page in a browser I get the error: bokeh.util.compiler.CompilationError: C:/Projects/ionRangeSlider/extensions_ion_range_slider_template.ts:12:22:’>’ expected. That particular line reads:
title = <label for={props.id}> {props.title}: </label> and the error seems to expect the opening label tag to end without any additional properties. I am not very familiar with typescript at the moment, but could someone please explain what I am missing to get this example working?
-Andrew
