- angular2-toaster: The library has been converted to a UMD Format to mirror @angular packages
and properly expose the top-level module. As a result, a number of changes have been implemented
and require updates to your code.
- You no longer need to (or can) import from
angular2-toaster/angular2-toaster
. You can now import directly fromangular2-toaster
. - There is no longer a
/lib
folder. Thetoaster.css
file has been moved to the root of the package since this is a top-level file, just likeangular2-toaster
. - If you still need to deep-link to a specific file rather than consuming it via
angular2-toaster
, the compiled files are now available under/src
instead of/lib
. - The default module style for the library is now
es2015
instead ofcommonjs
.
- You no longer need to (or can) import from
- angular2-toaster: UMD files are now included under the
/bundles
folder of the package. The UMD files expect@angular/core
,@angular/common
, andrxjs
to exist in the global namespaces if being consumed.
-
angular2-toaster: The peerDependency requirement for rxjs has been relaxed to
rxjs@^5.0.0-beta.11
. This allows for flexibility all the way back to@angular@2.0.0
. Closes #87. -
angular2-toaster: The
angular2-toaster
package entrance was never compiled via Ahead of Time compilation. As a result, nometadata.json
was available for the package entrance point and the library could not be consumed with AoT if trying to import directly fromangular2-toaster
. This has been corrected.
- README: The README documentation has been restructured to make it easier to find key information, such as how to get started. All import examples have been updated to match the new package structure.
- toast.component: When rendering BodyOutputType.Component, the toast instance itself is
applied to the rendered component. This allows the component to interact with the toast as
needed, as well as expose access to the toast id.
Addresses #84.
- toaster-container.component: ResetTimer on mouseout was not being properly called. It is now called appropriately when mouseoverTimerStop is set to true. Thanks to @kb3eua.
- README: Documented the mouseoverTimerStop config option and documented the addition of the toast instance to components when using BodyOutputType.Component. Closes #83.
- Angular 2.0.2 Support: The library has been tested through to Angular 2.0.2.
- toast.component: Dynamic template data would break
bodyOutputType.Component
rendering. A forceddetectChanges()
call has been added after the component is created and loaded to enable this functionality. Additional test cases were added for the gap. Closes #71. - angular2-toaster.js: The library entrance attempts to load
Toast
from./lib/toast
. Since theToast
file is an interface-only file, there is nothing to load. Closes #70.
- package.json: The
typings install
step was incorrectly set in thepostinstall
hook when it should have been set in theprebuild
hook. This was causing typings to attempt to be installed whenever the package was installed, which was incorrect. Closes #67.
- Angular: Final Version: The library has been updated to Angular
2.0.0
and the version has been bumped to1.0.0
as a result. Closes #63. - typings: The library has been updated from tsd to typings. Typings have been updated and
wired into the build and are now re-installed on
npm install
. In addition, typings are no longer checked into source. Closes #60.
- package.json: The main entrance has been updated to
angular2-toaster.js
. Addresses #60. - toast.component: The
bodyOutputType
property is public to enable AoT compilation on the template. Closes #62. - toaster.container.spec: The
TestComponent
module was improperly defined, causing errors in the correspondingngFactory
file. This has been corrected, closing #64.
- Angular: RC7: The library has been updated to Angular RC7. Closes #59.
- toaster.service: A
removeToast
observable has been added to toasterService. This allows the consumer to be notified when any toast is removed. This was added in #58.
- toaster.module: Toaster Module was improperly using
BrowserModule
when it should have been importingCommonModule
. Closes #55. - Test Build: Corrected broken Travis-CI build.
- Angular: RC6: The library has been updated to Angular RC6. Closes #52.
- Documentation: Updated to close #51.
-
package dependencies: @angular packages and the rxjs package have been removed from dependencies and added to peerDependencies to allow for more flexible consumption of alternative builds and configurations. The consumer is now responsible to ensure that the correct version is used per the minimum requirements in package.json. Closes #50.
-
toast.component: Due to Angular2-RC5 deprecating
ComponentResolver
and Angular2-RC6 removingComponentResolver
, dynamic component resolution has been moved toCompiler.compileComponentAsync
. -
toast.component: Dynamic body rendering via component has been moved to the
ngAfterViewInit
lifecycle hook to ensure full module compilation is complete and metadata is attached before attempting to render the component. -
toast.component: RC6 requires that all dynamically rendered components be enclosed in a
NgModule
. If a module is not used, an error will be thrown at runtime.
- toast.module: toast.module renamed to toaster.module for greater consistency with other components representing top-level APIs.
- demo: A plunker demo has been created and added to the README to begin work on #46.
- toaster.module: previous NPM build 0.3.6-rc.5 was improperly built with toast.module not being included. The module is now renamed and included appropriately.
- Angular: RC5: The library has been updated to Angular RC5.
- Angular: Toaster is now encapsulated in an ngModule ToastModule #47.
- Angular: RC4: The library has been updated to Angular RC4.
- toast.component.ts: The ClickHandler was called twice when the close button checked the ClickHandler function and the ClickHandler returned false. This is corrected by stopping the double event propagation. Closes #35.
- Angular: RC3: The library has been updated to Angular RC3.
- Angular RC2: The library has been updated to Angular RC2.
- toaster-container.component.ts: An explcit markForRef check has been added for timeouts. This allows toasts to be properly removed when their timeout expires, even if the rest of the consuming app is running as ChangeDectectionStrategy.OnPush.
- toaster.css: The toast icons were covering the entire toast body due to their layout. As a result, any component being rendered into the toast body could not have any interaction points (such as buttons) since it was beneath the icon. The toast has been slightly restructured to accommodate this scenario.
- README: Documentation has been added for the
toasterService.clear()
function. Added in 8e6404c. - demo.systemjs: An additional use case for rendering components with actions (buttons) in the toast body has been added to address #27.
- toast.component.ts: The
BodyOutputType.TrustedHtml
option was trying to improperly render thetoast.html
property of the toast. This has been updated to render the body property as the inner html of the new toast instance and addresses #24.
- README: Body Output Type documentation added to the README.
- toaster.container.component.ts: If
toast.timeout
property is set to 0, the toast instance will correctly be "sticky". If thetoast.timeout
is undefined, the timeout property assignment will continue to correctly fallback to thetoasterconfig.timeout
property. Closes #23.
The rc version has been bumped to match the currently targeted Angular 2 version.
- toaster.container.component.ts: If the component has not been properly initialized but ngDestroy is triggered, an exception will no longer be thrown. Fixed via #20.
- toaster.service.ts: JSDoc documentation added for public API methods of the toaster service.
This is the first release of Angular2-Toaster against the Angular2 Release Candidate. All Angular 2
NPM packages have been updated to use the appropriate @angular/*
import syntax. As a result, the
library is no longer backwards-compatible with Angular 2 Beta releases. Please update to
"@angular/*": "2.0.0-rc.1"
at minimum going forward.
- BodyOutputType.Component: BodyOutputType.Component (the ability to render components as the
body of the toast) has been updated to remove the soon to be deprecated
DynamicComponentLoader
in favor of theComponentResolver
. This eliminated a nasty but necessary manual timeout and detectChanges pairing and resolved a long-standing TODO. - Toast.Component: Toast rendering has been moved to its own component. This allows for
BodyOutputType.Component
to properly load into the appropriateTemplateRef
if multiple toasts are rendering components concurrently. - ToasterContainerComponent.Template: The template has been updated to the new
*ngFor
syntax. Closes #14.
- Angular2-rc compatibility
- toaster.css: Fixed width issues for center aligned
toast-containers
.
- toaster.service.ts: EventEmitters removed and Observables added instead to handle events between service and containers.
- toaster.service.ts:
pop
function returns toast instance after the toast has been added. - toaster.service.ts:
popAsync
function added to returnObservable<Toast>
to allow caller to subscribe to added toasts. - toaster.service.ts: If a
toaster-container
is not created when a toast is popped, an error will be thrown.
-
toastId:
toastId
has been changed from a number that is incremented internally in eachtoaster-container
to most-likely-random GUIDs that are generated in eachpop()
call. This allows for the toastId to always be known and prevents unwanted collisions when removing from multiple containers. -
toaster.service.ts: The
isAsync
parameter for the toasterService has been removed and a factory can no longer be passed in thetoaster-container
construction to specify async vs sync.