stripping template from html file to js file