Skip to content

Replace HTML generation in app.js with templates #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
slead opened this issue Dec 16, 2019 · 0 comments
Open

Replace HTML generation in app.js with templates #26

slead opened this issue Dec 16, 2019 · 0 comments

Comments

@slead
Copy link
Contributor

slead commented Dec 16, 2019

There are numerous examples where the DOM is built using hard-coded HTML in the JavaScript, eg:

var html = '<li>';
html += '<a href="#" data-toggle="collapse" data-target=".navbase-collapse.in" class="dropdown-item liBasemap" data-type="' + basemap.type + '" data-theme="'
          + basemap.theme + '"' +  'data-basemapId="' + basemap.id + '"';

Replace this with a more robust templating approach such as Handlebars.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant