- class TemplateLoader {
- constructor() {
- this.cacheBusting = false;
- }
- async get(templateName) {
- let url = `./templates/${templateName}.html`;
- if (this.cacheBusting) {
- url += "?v=" + new Date().getTime();
- }
- return await system.ajaxGet(url, { "Content-Type": 'text/html' });
- }
- }
|