Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The hot-reloading of example angular1 not working #168

Open
kimljj opened this issue Oct 17, 2016 · 4 comments
Open

The hot-reloading of example angular1 not working #168

kimljj opened this issue Oct 17, 2016 · 4 comments

Comments

@kimljj
Copy link

kimljj commented Oct 17, 2016

I would like to have a project with angular1, hot-reloading and typescript. I googled a lof, but didn't found any good examples.

I tried the your example projects, angular2 works, but angular1 not.

I got typings problem with jquery.

could you plz give a working standalone example, not have dependency with your main project

Thanks a lot!

@ryanhyslop
Copy link

ryanhyslop commented Oct 24, 2016

A quick patch to get the angular 1 version was to add the typings to the map in jspm.config.js

"@types/jquery": "npm:@types/[email protected]",

Despite the application running after this however the hot reloading doesn't seem to take effect. It makes the request for the module in the network, doesn't throw any errors, in the sources pain of the dev tools the code has updated. It just doesn't seem to take any effect. I got here experiencing similar issues on our own project and wanted to check the example.

Works fine for the angular 2 example. Happy to provide a bit more debugging information if anyone has a good idea where to start...

Further to this the __unload hook does fire on a module, however the __reload hook never seems to fire for anything other than the index.ts file.

@aluanhaddad
Copy link
Contributor

@ryanhyslop
Copy link

ryanhyslop commented Oct 26, 2016

I was working off the angular 1 example in this repo ( https://github.com/frankwallis/plugin-typescript/tree/master/examples/angular ). Thanks for pointing me towards that example however its quite helpful. Still wrapping my head round this.

I was bootstrapping the application without the directive, but I guess the missing step was to destroy and re-append the raw DOM on unloading the root module? Which may fill in the gap of my understanding which was previously filled with 'Magic Happens Here' :)

@aluanhaddad
Copy link
Contributor

Unfortunately, I haven't tested it. Angular 1 makes hot reloading difficult. Even in Angular 2 where it is actually supported, I don't find it to be a reliable workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants