ngx-toastr

🍞 Angular Toastr

MIT License

Downloads
1.8M
Stars
2.5K
Committers
54

Bot releases are hidden (Show)

ngx-toastr -

Published by scttcper about 8 years ago

default toast css can now be included via sass import
@import 'node_modules/toastr-ng2/toastr';

ngx-toastr -

Published by scttcper about 8 years ago

Fixed a lodash types issue when deploying to npm.

ngx-toastr -

Published by scttcper about 8 years ago

The default toast component has changed and is now an attribute instead of an element. Classes will be applied to this. Fixes #15

before

<div class="overlay-container">
  <div id="toast-container" class="toast-top-right">
    <toast-component>
      <div class="toast toast-success" style="opacity: 1;">
        <div class="toast-title" aria-label="title">title</div>
        <div class="toast-message" aria-label="Message">
        Message
        </div>
      </div>
    </toast-component>
  </div>
</div>

after

<div class="overlay-container">
  <div id="toast-container" class="toast-top-right">
    <div toast-component class="toast-success toast">
      <div class="toast-title" aria-label="Title">Title</div>
      <div class="toast-message" aria-label="Message">
        Message
      </div>
    </div>
  </div>
</div>
ngx-toastr -

Published by scttcper about 8 years ago

Fix a bug when publishing to npm

ngx-toastr -

Published by scttcper about 8 years ago

Bug fixes.
Repository now uses latest angular-cli and demo is using angular latest.

ngx-toastr -

Published by scttcper about 8 years ago

Fix #13 where the default values would change after hover

ngx-toastr -

Published by scttcper about 8 years ago

Remove use of { provide } from @angular/core which is gone in rc.6

New method of overriding global defaults inspired by angular2-jwt. If you're sticking with defaults importing ToastrModule into your NgModule is enough.

import { NgModule } from '@angular/core';
import { ToastrModule, provideToastr } from 'toastr-ng2';

@NgModule({
  bootstrap: [App],
  declarations: [App],
  // Import Toastr!
  imports: [ ToastrModule ],
  providers: [
    // Override options here
    provideToastr({
      timeOut: 500,
    })
  ]
})
class ExampleMainModule {}
ngx-toastr -

Published by scttcper about 8 years ago

Fixed a bug that was breaking toasts after the first timeout

ngx-toastr -

Published by scttcper about 8 years ago

  • Drop Injector dependency
  • Allow multiple position classes to be used simultaneously
ngx-toastr -

Published by scttcper about 8 years ago

  • Overlays are now synchronous thanks to more progress on material2.
  • EventEmitters for onHidden, onShown, onTap. You can subscribe to these from your ToastConfig (the one that is an optional parameter on every toast shown).
let customConfig = new ToastConfig();
customConfig.timeOut = 0;
customConfig.onTap.subscribe(() => console.log('tapped'));
this.toastrService.error('waits for tap to close', '', customConfig);
ngx-toastr -

Published by scttcper about 8 years ago

Add config option extendedTimeOut = how long the toast will display after a user hovers.
Silence error from ComponentResolver rc4 -> rc5

Breaking Changes

Now requires angular rc5 to work and @angular/platform-browser if you somehow weren't using that already.

ngx-toastr -

Published by scttcper about 8 years ago

Had issues getting ngModule to work with toast progress and have merged toast component and toast progress into a single component.

ngx-toastr -

Published by scttcper about 8 years ago

Changes:
Support release candidate 5.
Export toastr as an NgModule! Readme has more information on how to import it and overwrite defaults.

ngx-toastr -

Published by scttcper about 8 years ago

new features

Adds an optional progress bar.

breaking changes

If you've already copied the css, you will need to copy it again as there was a change. Still considering inlining it in the component styles.

ngx-toastr -

Published by scttcper about 8 years ago

  • Added newestOnTop which is default to true