PatrickJS / angular-hmr

:fire: Angular Hot Module Replacement for Hot Module Reloading
https://patrickjs.com
Apache License 2.0
505 stars 46 forks source link

Is Angular 1.x indeed supported or is the description misleading. #68

Closed NeverwinterMoon closed 6 years ago

NeverwinterMoon commented 6 years ago

The project description states "Angular-HMR Hot Module Reloading for Webpack 2 and Angular 4. All versions of Angular will work with this mod". It's a bit confusing as the first sentences says Angular 4 and the second already states that all versions of Angular will work. Does it mean all minor versions of Angular 4, as in 4.x, or can I indeed use it with Angular 1.x somehow? If the latter is true, is there an example configuration for 1.x? If that is not true, the description should definitely be changed not to mislead.

PatrickJS commented 6 years ago

it's Angular 2+ but I guess I can figure out a way to sort of support angular1 as well

NeverwinterMoon commented 6 years ago

@gdi2290 It would be perfection, to quote a famous TV character. We still have a few projects in our company written in ng 1, because it was hip and new some day, most of the projects are still supported. I only recently rewritten part of my project to Elm and was able to configure elm hot reload there, but it would be awesome to be able to have hot reloading for the legacy ng 1 code, too. It makes the development so, so much better.

PatrickJS commented 6 years ago

looking into angular1 a little bit again the real problem is that we need a way to destroy and boot the angular app. Any other way would require a lot more effort that is more error prone

stevenmccord commented 6 years ago

@gdi2290 were you able to figure this out. We have a 1x app as well. Thanks!

PatrickJS commented 6 years ago

no, Angular 1.x support is a bit too involved. it would be better if Angular 1.x added better control over how Angular bootstraps and being able to destroy the app then it would be a lot easier.