jeroenverfallie / angular-hmr-loader

A PoC for webpack HMR and angular directives
1 stars 0 forks source link

How does it work #1

Open yargalot opened 9 years ago

yargalot commented 9 years ago

Hey, pretty cool demo! Been trying for the last few days to get the example to work over at https://github.com/bitsoflove/jsconfbe-2015.

Works fine on that one but cant seem to get it to work on a test project. Just wondering if there was a list to follow to set it up?

Thanks!

yargalot commented 9 years ago

just as a note, been trying to follow the other repo, keeps coming up with

[HMR] Cannot apply update. Need to do a full reload!
dev-server.js:15 [HMR] Error: Aborted because 43 is not accepted
jeroenverfallie commented 9 years ago

Hey, sorry, I didn't get a notification of your issue, I'll add a readme tonight on how to use it. Hopefully that helps.

Sorry for the wait!

yargalot commented 9 years ago

All good man! I actually reversed engineered some stuff on it and got it working over at https://github.com/yargalot/Angular-HMR. Got chaining working and some other stuff just to screw around with it and build off what you had. Really cool concept!

That being said , Im failboating on singletons like factories and services though, tried multiple things and havnt been able to get them to update in app.

Anyway, happy to make a pull request and put the changes in this repo if you want.

jeroenverfallie commented 9 years ago

Very nice to see someone picked up!

You put a lot of work into what was just a PoC, so I'm happy to make yours the main repo, and I'll happily contribute there. (in fact, i'll try replacing my version with yours in a running project here right now)

I'll check your repo more in detail tonight, but I fear for singletons, and scope bindings for example, because they get transformed, and stored in deep private variables in the angular core.

Cool stuff!

yargalot commented 9 years ago

Hah thanks!

The providerCache is a pain yeh, cant figure out a way to get to it. I did have some thoughts about running an updater in an angular.run module and listening to events to the hotmodule thing spits out but yeh, need to have a fiddle! Will be great to see what you think anyway!