cognoma / frontend

Frontend for Project Cognoma
http://cognoma.org/
Other
4 stars 22 forks source link

MLK DAY - Replace $templateCache with imported inline templates #49

Closed brendanmckeown closed 7 years ago

brendanmckeown commented 7 years ago

Currently, the Angular $templateCache service is being used to compile all component templates into the js/template.js file. This is good for performance, because it prevents Angular from having to make a separate request for every template it encounters. The $templateCache service can be buggy at times, though, and adds extra complexity to the build process. You can achieve the same benefit with less complexity by simply using inline templates within your Angular components. And with Browserify, you can keep the template files nicely separated from the component JS and import them, as if they were inline, using require(). Browserify requires the "stringify" middleware package in order to do this.

dcgoss commented 7 years ago

Resolved by https://github.com/cognoma/frontend/pull/56