Git Product home page Git Product logo

Comments (11)

Stabzs avatar Stabzs commented on July 17, 2024

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';

from angular2-toaster.

AlexZhidkov avatar AlexZhidkov commented on July 17, 2024

Thank you for the answer and your library.

from angular2-toaster.

sagarjumble avatar sagarjumble commented on July 17, 2024

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

from angular2-toaster.

Stabzs avatar Stabzs commented on July 17, 2024

@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.

from angular2-toaster.

sagarjumble avatar sagarjumble commented on July 17, 2024

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

from angular2-toaster.

Stabzs avatar Stabzs commented on July 17, 2024

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.

from angular2-toaster.

sagarjumble avatar sagarjumble commented on July 17, 2024

I am using rc.5

from angular2-toaster.

sagarjumble avatar sagarjumble commented on July 17, 2024

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

from angular2-toaster.

Stabzs avatar Stabzs commented on July 17, 2024

@sagarjumble [email protected] 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.

from angular2-toaster.

sagarjumble avatar sagarjumble commented on July 17, 2024

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

from angular2-toaster.

Stabzs avatar Stabzs commented on July 17, 2024

@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.

from angular2-toaster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.