Git Product home page Git Product logo

angular2-flash-messages's People

Contributors

berndartmueller avatar mikebrsv avatar moff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

angular2-flash-messages's Issues

Cannot find module angular2-flash-messages

I am trying to use angular2-flash-messages but getting Cannot find module angular2-flash-messages.

Followed installation steps from https://github.com/moff/angular2-flash-messages.

Attaching my app.module.ts-


import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import {RouterModule, Routes} from '@angular/router';
import { AngularFireModule, AuthProviders, AuthMethods} from 'angularfire2';
import {FirebaseService} from './services/firebase.service';
import {FlashMessagesModule} from 'angular2-flash-messages';

import { AppComponent } from './app.component';
import { HomeComponent } from './components/home/home.component';
import { ListingsComponent } from './components/listings/listings.component';
import { NavbarComponent } from './components/navbar/navbar.component';
import { ListingComponent } from './components/listing/listing.component';
import { AddListingComponent } from './components/add-listing/add-listing.component';
import { EditListingComponent } from './components/edit-listing/edit-listing.component';


const appRoutes: Routes = [
  {path:'', component:HomeComponent},
  {path: 'listings', component:ListingsComponent},
  {path:'listing/:id', component:ListingComponent},
  {path: 'add-listing', component:AddListingComponent}
]

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    ListingsComponent,
    NavbarComponent,
    ListingComponent,
    AddListingComponent,
    EditListingComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    FlashMessagesModule,
    RouterModule.forRoot(appRoutes)
  ],
  providers: [FirebaseService],
  bootstrap: [AppComponent]
})
export class AppModule { }

And here'e the error:

ERROR in C:/Users/user/Downloads/Compressed/proplistings_part_4/src/app/components/navbar/navbar.component.ts (3,36): Cannot find module 'angular2-fla
sh-messages'.

ERROR in C:/Users/user/Downloads/Compressed/proplistings_part_4/src/app/app.module.ts (8,35): Cannot find module 'angular2-flash-messages'.

ERROR in C:/Users/user/Downloads/Compressed/proplistings_part_4/src/app/app.module.ts (8,35): Cannot find module 'angular2-flash-messages'.

Can someone help here.

Looks like its missing a declaration of 'classes'

ERROR in /Users/[myprojectpath]/src/$$_gendir/node_modules/angular2-flash-messages/module/flash-messages.component.ngfactory.ts (211,87): Property 'classes' does not exist on type 'FlashMessagesComponent'.

If I add this it all works. Occurs in 1.0.5

[Feature Request] Display flash message referenced in show() method

Hi,

I am wondering if I can only show flash message which is referenced while invoking show() method. The name of container should be specified while calling show() method.

e.g

In any-component.html
<flash-messages name="flash-fixed"></flash-messages>
or

<div id="flash-fixed" >  <!-- or -->  <div class="flash-fixed" > 
<flash-messages></flash-messages>
</div>

In any-component.ts :

this._flashMessagesService.show('We are in about component!', { cssClass: 'your-css-class' , container: 'flash-fixed' });

The reason behind doing this is, flash-messages cannot be used separately in different components (correct if I am wrong), if used in different components and show() method is called then message would appear in all the components but expected behavior is it should be show message in specified component.

Uncaught Error: Unexpected module 'FlashMessagesModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation.

Uncaught Error: Unexpected module 'FlashMessagesModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@component annotation.
at syntaxError (http://localhost:4200/vendor.bundle.js:50893:34)
at http://localhost:4200/vendor.bundle.js:64625:40
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:4200/vendor.bundle.js:64607:54)
at JitCompiler._loadModules (http://localhost:4200/vendor.bundle.js:75884:70)
at JitCompiler.compileModuleAndComponents (http://localhost:4200/vendor.bundle.js:75857:36)
at JitCompiler.compileModuleAsync (http://localhost:4200/vendor.bundle.js:75786:37)
at PlatformRef
.bootstrapModuleWithZone (http://localhost:4200/vendor.bundle.js:5513:25)
at PlatformRef
.bootstrapModule (http://localhost:4200/vendor.bundle.js:5499:21)
at Object.181 (http://localhost:4200/main.bundle.js:372:124)

Angular 10 Support

This package hasn't been updated for 2 years. Any news on the update?

Flash Massage showing `default text` along with the defined flash message.

Error:

error

I am not sure how this text default text is showing.

Code:

this.flashMessagesService.show('We are in about component!', { cssClass: 'alert-success', timeout: 1000 });

Angular Version


    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.7.3
Node: 7.8.0
OS: darwin x64
Angular: 5.2.8
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cdk: 5.2.4
@angular/cli: 1.7.3
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.7.2
webpack: 3.11.0

Demo link

just wondering if you could put a demo or live example so we can easily decide if the module fits our needs. Thanks!

Is there a way to add multiple cssClasses?

If I have something like this

this.flashMessage.show('You are now logged in', { cssClass: 'alert-success', timeout: 5000 });

Is there a way I can add multiple cssClasses instead of just alert-success(in this example above) directly from here without having to wrap alert-success in another css class? Maybe something like this

this.flashMessage.show('You are now logged in', { cssClass: ['alert-success', 'my-new-css'], timeout: 5000 });

angular2-flash-messages

Continually have to copy and past in new node modules because angular2-flash-messages cant be found in my node_modules. This is very annoying as it does it when I haven't even brought any new software in and continues to slow my progress. The error reads.

Error: cannot find FlashMessagesModule in app.module.ts and one of my own components even though I've clearly imported it in and have made sure to save as a dependency.

Support html?

It would be very useful if it can support displaying 'html' because very often the server error response is in plain html from some legacy system and display html by default covers both plain text and html cases.

Issue importing Package

I have been running into an issue when I install angular2-flash-messages. Several devs had this issue so I took a look. When we follow the instructions on the readme, and run ng serve we get:

ERROR in src/app/app.module.ts(3,24): error TS2307: Cannot find module 'angular2-flash-messages'.
src/app/app.module.ts(14,5): error TS2304: Cannot find name 'FlashMessagesModule'.

Same in the IDEs. It seems like the exporting module may be missing or the readme may be out of date. I was able to get them going by importing from the files directly for now ie:
import { FlashMessagesModule } from 'angular2-flash-messages/module/module.js'; and
import { FlashMessagesService } from 'angular2-flash-messages/module/flash-messages.service.js';

Lucky for us, these are just projects for personal use so this implementation is fine, but I just wanted to give you folks a heads up that there may be an issue somewhere.

Dependencies if helpful, rest of package.json is just standard ng cli output:

"dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "angular2-flash-messages": "^2.0.1",
    "core-js": "^2.4.1",
    "rxjs": "^5.5.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.5.2",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2"
  }

_this._flashMessagesService.grayOut is not a function

I imported everything, ng-serve does not give any errors,

but the moment I call a function of this._flashMessagesService I get an error saying the following:

_this._flashMessagesService.grayOut is not a function

or

_this._flashMessagesService.show is not a function

Versioning

I see that the most recent install 1.0.5 requires angular 2.4.9. Is there a way to track which version matching. I have 2.4.0 right now. Probably will update here within the following week, but with angular versioning constantly changing I would like to have a better sense of matching.

unable to build using prod

when I try to use --aot to build a project with FlashMessagesModule I get an error

ERROR in Error: Unexpected value ‘FlashMessagesModule in x/node_modules/angular2-flash-messages/module/module.d.ts’ imported by the module ‘AppModule in x/src/app/app.module.ts’. Please add a @NgModule annotation.

does FlashMessagesModule not work with aot yet?

Mimsatch version, found version 4 , expected 3.

everything was working fine and suddenly just stopped working . didn't change anything related to versions but still get this error. i tried changing to a different version of flash-messages but did not work.

ERROR in Error: Metadata version mismatch for module C:/Users/admin/Desktop/WebDev/MeanAuth/client/node_modules/angular2-flash-messages/module/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Users/admin/Desktop/WebDev/MeanAuth/client/src/app/app.module.ts, resolving symbol AppModule in C:/Users/admin/Desktop/WebDev/MeanAuth/client/src/app/app.module.ts, resolving symbol AppModule in C:/Users/admin/Desktop/WebDev/MeanAuth/client/src/app/app.module.ts
    at Error (native)
    at syntaxError (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:1729:34)
    at simplifyInContext (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24979:23)
    at StaticReflector.simplify (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24991:13)
    at StaticReflector.annotations (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24418:41)
    at _getNgModuleMetadata (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@ngtools\webpack\src\plugin.js:207:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@ngtools\webpack\src\plugin.js:443:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)

here is my package.json :

{
  "name": "client",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.2.4",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "angular2-flash-messages": "^2.0.4",
    "core-js": "^2.4.1",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.4.4",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.3.3"
  }
}

Feature requests (Close button, default config, customized html template)

This is a great package, but I think there are only few things missing to be outstanding:

  • Close button: adding a close button so users can dismiss the message.
  • Default config: It would be great being able to use a default config rather than having to provide the timeout or class every single time we call the flashmessage().
  • Customized HTML template: Defining our own html template in which the Flash message is displayed would be great.

Doesn't Appear to be AOT ready yet

The latest version of angular-2-flash-messages works fine with a regular ng s, but when I try to precompile with the aot flag, I get the following:

➜  angcore git:(moderator-user-interactions) ✗ ng s --aot=true
** NG Live Development Server is running on http://localhost:4200. **
  0% compilingUnexpected value 'FlashMessagesModule' imported by the module 'AppModule'

Build Error

when I run ng build I got :

ERROR in FlashMessagesModule is not an NgModule

When I run ng serve the same error appears just once and then everything work. But now it can't build!
Any possible solution?

not working on redirect to another component

Hello,

I have it all set in one component and there flash messages work, however if i redirect from that component to another component (where I have imported the package and added it as a dependency in the constructor and the view tags in its template), I do not see the error message and after the timeout I get this error:

ERROR Error: ViewDestroyedError: Attempt to use a destroyed view: detectChanges
    at viewDestroyedError (core.es5.js:8451)
    at Object.debugUpdateDirectives

Is it even possible?

Using variables in flash message template

Not sure if this is possible, but I'd like to use variables like below:

{{ result.result }} :: {{ result.messages }}

I could then call the service like this:

this._flashMessagesService.show();

Is there a way to make this behave this way? I'd just put the variables in the .show() args, but they are results of an observable and I can't get it to work that way.

Thx

Custom CSS not taking effect

I created a login component for my app. I'm adding a simple css rule to the login-user.component.css file to play around with the module.

.flash-messages {
    background-color: blue;
}

That simple rule is not taking any effect. I'm guessing that the module is imported correctly since the alert is showing on click and I can change messages and timeout. It is something else I need to do to make this work?

Getting error when initiating project

Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (/Users/gokulanv/Downloads/angular2-flash-messages-master/node_modules/@angular/cli/tasks/serve.js:51:63)
at check_port_1.checkPort.then.port (/Users/gokulanv/Downloads/angular2-flash-messages-master/node_modules/@angular/cli/commands/serve.js:123:26)
at process._tickCallback (internal/process/next_tick.js:109:7)

I get this error, after doing npm install and tried to do ng serve

Warnings printed to console with 1.0.1 and [email protected]

I see the following in the JS console when using angular2-flash-messages:

./~/angular2-flash-messages/index.js
Cannot find source file 'index.ts': Error: Can't resolve './index.ts' in '/Users/me/my_app/g/node_modules/angular2-flash-messages'
 @ ./src/app/app.module.ts 16:0-62
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main
client:42 ./~/angular2-flash-messages/module/index.js
Cannot find source file 'index.ts': Error: Can't resolve './index.ts' in '/Users/me/my_app/g/node_modules/angular2-flash-messages/module'
 @ ./~/angular2-flash-messages/index.js 5:9-34
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main
client:42 ./~/angular2-flash-messages/module/module.js
Cannot find source file 'module.ts': Error: Can't resolve './module.ts' in '/Users/me/my_app/g/node_modules/angular2-flash-messages/module'
 @ ./~/angular2-flash-messages/module/index.js 2:15-34
 @ ./~/angular2-flash-messages/index.js
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main
client:42 ./~/angular2-flash-messages/module/flash-messages.service.js
Cannot find source file 'flash-messages.service.ts': Error: Can't resolve './flash-messages.service.ts' in '/Users/me/my_app/g/node_modules/angular2-flash-messages/module'
 @ ./~/angular2-flash-messages/module/index.js 4:31-66
 @ ./~/angular2-flash-messages/index.js
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main
client:42 ./~/angular2-flash-messages/module/flash-messages.component.js
Cannot find source file 'flash-messages.component.ts': Error: Can't resolve './flash-messages.component.ts' in '/Users/me/my_app/g/node_modules/angular2-flash-messages/module'
 @ ./~/angular2-flash-messages/module/module.js 13:33-70
 @ ./~/angular2-flash-messages/module/index.js
 @ ./~/angular2-flash-messages/index.js
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main
client:42 ./~/angular2-flash-messages/module/flash-message.js
Cannot find source file 'flash-message.ts': Error: Can't resolve './flash-message.ts' in '/Users/me/my_app/g/node_modules/angular2-flash-messages/module'
 @ ./~/angular2-flash-messages/module/flash-messages.component.js 12:22-48
 @ ./~/angular2-flash-messages/module/module.js
 @ ./~/angular2-flash-messages/module/index.js
 @ ./~/angular2-flash-messages/index.js
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main

It seems to work. I'm using angular 2.0.0-rc5 and angular2-flash-messages 1.0.1. (I had some issues with 1.0.2 which I'll log a separate bug about).

Let me know if you'd like any more information or help reproducing/diagnosing this.

Angular 7 Support

npm WARN [email protected] requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.

Would love to use this on Angular 7.x Thanks for all you do. Let me know if I could help in some way.

Adding of fade effect to angular2-flash-messages

Hi...

currentley i am using the flash message like below
this._flashMessagesService.show('Added Successfully!', { cssClass: 'alert-success', timeout: 1900 });
How an i add the fade effect to the message ?

TypeError: Cannot read property 'flashMessagesService' of undefined

I cant get my head around this problem.

This is the Code:

import { Component, OnInit } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { FlashMessagesService } from 'angular2-flash-messages';

@Component({
  selector: 'app-add-client',
  templateUrl: './add-client.component.html',
  styleUrls: ['./add-client.component.css']
})
export class AddClientComponent implements OnInit {
  
  companyName: string;
  companyCvr: string;
  
  clientCollection: AngularFirestoreCollection<any> = this.afs.collection('client');

  constructor(
    private afs: AngularFirestore,
    private flashMessagesService: FlashMessagesService) { 
      
    }

  ngOnInit() {
    
  }

  onSubmit(){
    // Get the ID for companyCvr = this.companyCvr
    this.clientCollection.doc(this.companyCvr).set({
      companyName: this.companyName,
      companyCvr: this.companyCvr
    })
    .then(function() {
      console.log("Document successfully written!");
      this.flashMessagesService.show('Kunden er nu oprettet', { cssClass: 'alert alert-success', timeout: 2000 });
    })
    .catch(function(error) {
        console.error("Error writing document: ", error);
    });
  }

}

If I move the:
this.flashMessagesService.show('Kunden er nu oprettet', { cssClass: 'alert alert-success', timeout: 2000 });
outside the .then block it runs fine but inside the .then I get this error: Error writing document: TypeError: Cannot read property 'flashMessagesService' of undefined

Any suggestions?

Wrapper around flashmessages

Hi,

I have a service around the flash messages service as following:

import { Injectable } from '@angular/core';
import { FlashMessagesService } from 'angular2-flash-messages';

@Injectable()
export class MessagesService {
   constructor(private flashMessagesService: FlashMessagesService) {}

   public show(message: string, cssClass: string = 'success') {
      this.flashMessagesService.show(message, {
         cssClass: cssClass,
         closeOnClick: true,
         showCloseBtn: true,
         timeout: 5000
      });
   }
}

And in my component as following:

constructor(
      private messages: MessagesService,
){}

ngOnInit() {
      this.messages.show('Test', 'success');
}

But when this runs I get the following error:
ManagementLocationsComponent.html:1 ERROR TypeError: this.flashMessagesService.show is not a function

Any ideas what is going wrong over here?

Kind regards,
Yanick

customizable?

Hi there,

I would like to customize the time it will be shown, and I would like to a

background-color: #333;
opacity: 0.9;
position: absolute;
height: 100%;
width: 100%;
overflow: hidden;
background-image: url('/assets/img/ajax-loader.gif');
background-position: center;
background-repeat: no-repeat;
color: black;

but it seems that the html code is always present, so I dont know where to put the styles so they move away with the flash message.

Any Ideas?

Flash Not Showing

Hi there,
My current ionic version is 4.1.0, and working on ionic 3 using angular and cordova.
I've made a new ionic package to test this.
I've installed this plugin and added the module in _app.module.ts_ also, imported service in my home.ts file. also added <flash-messages></flash-messages> in app.html file.

when this.flashMessageService.show('Some Text'); is firing it makes a div with class="alert flash-message alert-success" and some other ng-* attributes, I can see this in inspect element,
but the issue is message is not displaying in front/app.

FlashMessagesModule is not an NgModule

Flash Messages had been working fine on my app and then suddenly started throwing an error:
FlashMessagesModule is not an NgModule
errors @ client?93b6:80 sock.onmessage @ socket.js:37 EventTarget.dispatchEvent @ eventtarget.js:51 (anonymous) @ main.js:274 SockJS._transportMessage @ main.js:272 EventEmitter.emit @ emitter.js:50 WebSocketTransport.ws.onmessage @ websocket.js:35 wrapFn @ zone.js:889 ZoneDelegate.invokeTask @ zone.js:275 Zone.runTask @ zone.js:151 ZoneTask.invoke @ zone.js:345

I've tried importing using both:
import { FlashMessagesModule } from 'angular2-flash-messages';
and:
import { FlashMessagesModule } from 'angular2-flash-messages/module';

I followed the directions here for installation. Thanks for help.

Karma problems

Hi, I have problems with angular2-flash-messages
error log:
{ "stack": "(SystemJS) XHR error (404 Not Found) loading node_modules/angular2-flash-messages/index.js\n\tError loading node_modules/angular2-flash-messages/index.js as \"angular2-flash-messages\" from .tmp/app/user-mgmt/login.component.js", "originalErr": {}, "line": 791, "sourceURL": "node_modules/systemjs/dist/system.src.js" }

systemjs.config.js
map: { \\ 'angular2-flash-messages': 'npm:angular2-flash-messages' \\ packages: { \\ 'angular2-flash-messages': { main: 'index.js', defaultExtension: 'js' }

sample app and further configuration: https://github.com/dezerb/dezerb-tripadvisor-ng/
Best regards,
dezerb

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.