JS and template