-
Notifications
You must be signed in to change notification settings - Fork 167
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
Module not found #5
Comments
To be honest i'we only ever used system.js with my angular2 applications. But i'll have a look and let you know. |
I've managed to make it work with webpack. It was actually quit simple. All i did was clone this repo: Installed the library And modified: home.ts import {Component, OnInit} from 'angular2/core';
import {FORM_DIRECTIVES} from 'angular2/common';
import {SimpleNotificationsComponent, NotificationsService} from 'angular2-notifications/components'
@Component({
selector: 'home',
directives: [SimpleNotificationsComponent],
pipes: [],
styles: [require('./home.scss')],
template: require('./home.html')
})
export class Home implements OnInit {
constructor(private _service: NotificationsService) {}
public options = {
timeOut: 5000,
lastOnBottom: true
};
create() {
this._service.success('bla', 'example')
}
} bootstrap.ts ...
import {NotificationsService} from 'angular2-notifications/components'
...
return bootstrap(App, [
...
NotificationsService,
...
}); And home.html <simple-notifications [options]="options"></simple-notifications>
<button (click)="create()"></button> It's all working but the css is a little broken. There might be some overlaps. |
thanks for response. I will follow you suggestion with Angular2-webpack-starter. greetings |
np.. glad i could help. |
hi there,
i am finding problems at use it wit webpack
ERROR in multi vendor Module not found: Error: Cannot resolve module 'angular2-notifications' in C:\Us ers\Sergio_2\auth-angular2-app @ multi vendor
here is the webpack config fragment
entry: { 'vendor': [ // Polyfills 'es6-shim', 'es6-promise', 'reflect-metadata', 'zone.js/dist/zone-microtask', 'zone.js/dist/long-stack-trace-zone', // Angular2 'angular2/platform/browser', 'angular2/platform/common_dom', 'angular2/core', 'angular2/router', 'angular2/http', // RxJS 'rxjs', // Other 'angular2-jwt', 'angular2-notifications' ], 'app': [ './src/index' ] }
The text was updated successfully, but these errors were encountered: