Cannot Asynchronously Load Components With Annotations
#1
Comments
can you create an issue in the angular2 repo and mention this issue? |
@datatypevoid shouldn't CanDeactivateGuard be a service rather than an interface? |
I just followed their examples in the docs. It works fine when loaded normally. I'll open the issue though, thanks! |
The same error is reported here, but it may or may not be related: angular/angular#9414 |
The setup I have described in the issue is working fine now after pulling PatrickJS/PatrickJS-starter@01e4533 I have both a |
@datatypevoid is your |
|
can you provide a link reproducing the issue? |
I created a repo but wasn't able to reproduce the error |
I don't seem to be able to either... I am starting to think I must have fat fingered something initially, but I copied and pasted the example code right from my project at the time. I guess if I manage to come up with something I will let you know. Sorry for wasting you time! |
no worries |
*I'm submitting a ... *
[ x ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
What is the current behavior?
I am currently trying async load some components as is done in angular2-webpack-starter. These components are using
guards
similar to the examples in therouter
3.0.0-alpha.7
docs, and upon attempting to navigate to the async component, I get the error:To demonstrate this problem you could create a guard for preventing the user from leaving the view with something along these lines:
You might then implement that guard like so on a
component
to prevent the user from navigating away from a form before submitting it, for example:I have my routes configured as so:
Attempting to navigate to the
Register
component in this case produces the error above.To be able to load guarded components asynchronously.
The text was updated successfully, but these errors were encountered: