ngx-toastr

🍞 Angular Toastr

MIT License

Downloads
1.8M
Stars
2.5K
Committers
54

Bot releases are hidden (Show)

ngx-toastr -

Published by scttcper over 7 years ago

Renamed toastr-ng2 to ngx-toastr. Please point your package.json to the new name.

some slight changes to toast component. Toast classes are now applied before activate()

ngx-toastr -

Published by scttcper over 7 years ago

minor release. upgraded build dependencies. angular-cli26, rollup, etc.

ngx-toastr -

Published by scttcper almost 8 years ago

Adds a onActivateTick Toast Option. fires a ApplicationRef.tick() from the toast component when activated. Might help show the toast if you are showing it from a websocket
See issue #53

ngx-toastr -

Published by scttcper almost 8 years ago

  • add a custom ToastInjector - passes toast config to ToastComponent's constructor
  • add enableHtml to options and allows using html in message #47
  • adds a ToastContainerDirective that allows you to target the div to show toasts #28 find more in the readme.
  • removes BrowserModule for lazy loading #51
  • upgrade overlay (from material 2) to latest
ngx-toastr -

Published by scttcper almost 8 years ago

Fixes an Angular 2.4.x error.

ngx-toastr -

Published by scttcper almost 8 years ago

Use rollup to build the toastr.umd.js #42 @yarrgh

ngx-toastr -

Published by scttcper almost 8 years ago

Adds a UMD compiled toastr.umd.js for systemjs users

ngx-toastr -

Published by scttcper almost 8 years ago

Module is now compiled into es2015 instead of commonjs before deploying to npm. If you're specifically importing this as a commonjs module you should now import it like @angular/core.

If you're using angular-cli there should be no change.

ngx-toastr -

Published by scttcper almost 8 years ago

update to angular-cli v23

ngx-toastr -

Published by scttcper almost 8 years ago

Supports Angular 2.3.x. Thanks @cmckni3 #37
Currently released under npm i toastr-ng2@next

ngx-toastr -

Published by scttcper almost 8 years ago

Changes:
Toast Component attribute toastClasses being private was throwing an AoT error.

ngx-toastr -

Published by scttcper almost 8 years ago

Big thanks to @yarrgh in #34

  • Set global settings more easily
// your @NgModule
imports: [
  ToastrModule.forRoot({ alwaysOnTop: false, timeOut: 10000 })
]
  • new individual settings
this.toastrService.success('message', 'title', {timeOut: 10000 });
  • fixed a bug when setting timeOut = 0
ngx-toastr -

Published by scttcper almost 8 years ago

  • Fixes AoT when setting global settings #32
  • Makes ToastConfig not injectable and no longer provided globally for no reason
  • I believe using forRoot should prevent multiple instances of the service from being started when used properly #30
  • removes provideToastr for settings that should be set inside a component see breaking changes or https://github.com/scttcper/toastr-ng2#override-default-settings

##Breaking changes:

  1. Import the module using ToastrModule.forRoot()

before

@NgModule({
  imports: [
    ToastrModule
  ]
})
export class AppModule { }

after

@NgModule({
  imports: [
    ToastrModule.forRoot()
  ]
})
export class AppModule { }
  1. Inject ToastrConfig, typically in your root component, and customize the values of its properties in order to provide default values for all the timepickers used in the application.
import { ToastrConfig } from 'toastr-ng2';
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  constructor(config: ToastrConfig) {
    // your global config here
    config.timeOut = 100;
  }
}
ngx-toastr -

Published by scttcper almost 8 years ago

fixes maxOpened bug when maxOpened is more than 1

ngx-toastr -

Published by scttcper almost 8 years ago

when extendedTimeOut is 0 it will no longer hide immediately #27

ngx-toastr -

Published by scttcper almost 8 years ago

fix insert new toast on top

ngx-toastr -

Published by scttcper almost 8 years ago

fix another angular 2.2.x bug on removing toastrs
drop some unused code

ngx-toastr -

Published by scttcper almost 8 years ago

fixed breaking changes from angular 2.2.x reported in #21

breaking

removes the need pass viewContainerRef to ToastrService. The setup instructions in the readme have been updated.

ngx-toastr -

Published by scttcper almost 8 years ago

fixes #20

ngx-toastr -

Published by scttcper almost 8 years ago

AOT compilation support. If you are using angular-cli you can now use --aot without errors.