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

Webpack question #6

Closed
AlexZhidkov opened this issue Mar 20, 2016 · 11 comments
Closed

Webpack question #6

AlexZhidkov opened this issue Mar 20, 2016 · 11 comments
Labels

Comments

@AlexZhidkov
Copy link

Hi, I'm new to webpack can you tell me how to link your scc using webpack?

@Stabzs
Copy link
Owner

Stabzs commented Mar 20, 2016

I don't use webpack myself so I'm probably not the best resource. However, regardless of how you "pack" and deliver your source, the consumption of the library should be the same. You'd want to install the package and import what you need from the angular2-toaster module file:

import {ToasterContainerComponent, ToasterService} from 'angular2-toaster/angular2-toaster';

@AlexZhidkov
Copy link
Author

Thank you for the answer and your library.

@sagarjumble
Copy link

Hey it throws error using web pack .
Error zone.js:269 Uncaught Can't resolve all parameters for ToastComponent: (?, ComponentFactoryResolver).

@Stabzs
Copy link
Owner

Stabzs commented Sep 9, 2016

@sagarjumble it appears to be failing on the private sanitizer: DomSanitizer constructor parameter for ToastComponent. This is included via '@angular/platform-browser'. Make sure you are loading it appropriately in your web pack configuration.

@sagarjumble
Copy link

@Stabzs I am loading the platform browser using
import { BrowserModule } from '@angular/platform-browser'
Is there any other issues.

@Stabzs
Copy link
Owner

Stabzs commented Sep 9, 2016

It is impossible to say without a reproduction of the issue. It can't resolve the injection so something must not be loaded correctly. Make sure that you are using all 2.0.0-rc.6 angular packages.

@sagarjumble
Copy link

I am using rc.5

@sagarjumble
Copy link

Trying to Utilize it in https://github.com/akveo/ng2-admin.git
Above project

@Stabzs
Copy link
Owner

Stabzs commented Sep 9, 2016

@sagarjumble angular2-toaster@0.5.0-rc.6 and later requires peer dependencies of angular 2 2.0.0-rc.6 or higher. They renamed the DOM sanitization service, which is why your injection is failing. Please either degrade angular2-toaster to an rc.5 compatible version (not recommended) or upgrade to angular 2 rc.6.

@sagarjumble
Copy link

Can you provide me a link which will help me to upgraded to rc6

@Stabzs
Copy link
Owner

Stabzs commented Sep 9, 2016

@sagarjumble you can take a look at something like the following: http://proudmonkey.azurewebsites.net/upgrading-from-angularjs-2-beta-to-rc-6/. I highly recommend you read the changelog for rc6 as there are a large number of breaking changes.

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

No branches or pull requests

3 participants