-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
6.0.5 errors due to BrowserModule #43
Comments
A better approach for the singleton pattern can be found here: angular/angular#13854 |
I just released 6.0.6 address this issue by using CommonModule However, when I tried the pattern you suggest, I'm kinda stuck. Please check this branch I think by using that pattern, somehow DI doesn't really work anymore. |
Thanks for the fix. I haven't had a chance to test your tree. The code looks correct to me. What exactly happens? I have used the pattern successfully in one of my modules. |
I know. I went thru that one. For some reasons, clipboard service doesn't get WindowSrv instance. |
I figured it out. I forgot to put windowSrv in providers. duh ! Please try 7.0.1 |
Working fine, thank you! Much better now 😄 I hope one day Angular will provide a more convenient pattern for this use case. |
With 6.0.5 I get an error on my lazily loaded modules using the
ClipboardModule
:Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.
I do not load
ClipboardModule
in my main bundle but only in lazily loaded modules usingThe problem is that it imports
BrowserModule
, it should importCommonModule
instead.The text was updated successfully, but these errors were encountered: