toddmotto / ama

Ask me anything!
20 stars 3 forks source link

angular-styleguide HTML #45

Closed blowsie closed 8 years ago

blowsie commented 8 years ago

Some IDE's, namely Webstorm only offer partial support for HTML inside JS files, for example automatic code formatting does not work.

I would like to have my component / directive HTML inside its own HTML file.

Doing this causes some issues when using systems such a Webpack, as the files are not automatically added to the template cache.

Thanks

toddmotto commented 8 years ago

Literally about to take off for a 3 hour plane ride. Check out ngTemplate cache or something similarly named. For grunt and gulp etc :)

@toddmotto

On 8 Aug 2016, at 07:48, Sam Blowes notifications@github.com wrote:

Some IDE's, namely Webstorm only offer partial support for HTML inside JS files, for example automatic code formatting does not work.

I would like to have my component / directive HTML inside its own HTML file.

Doing this causes some issues when using systems such a Webpack, as the files are not automatically added to the template cache.

What is your opinion on separating out the HTML from the JS file? (Good/Bad/Ugly?) Is there a smart way to add the HTML files to the template cache? Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

blowsie commented 8 years ago

Thanks Todd, I'll take a look at using https://github.com/WearyMonkey/ngtemplate-loader or similar.

I think having these files separated in my large application is going to be much more maintanable. Should be better for VCS too :+1: