Skip to content

Commit

Permalink
Merge 24dcaea into 80e6a0b
Browse files Browse the repository at this point in the history
  • Loading branch information
Stabzs committed Feb 23, 2018
2 parents 80e6a0b + 24dcaea commit f07690b
Show file tree
Hide file tree
Showing 20 changed files with 2,600 additions and 272 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,20 @@
# 5.0.0-alpha.1 (2018-02-22)
### FEATURES
* **angular2-toaster:** The toaster.css is now generated via SCSS. Thanks to @bastienmoulia for his
hard (and patient) work on this feature!

* **demos:** `angular-cli` project updated to include better examples around multi-container
instances.

### BUG FIXES
* **toaster-container.component:** The container's config is no longer copied onto the toast
instance. Instead, titleClass and messageClass have been moved to input properties so that
individual containers can uniquely style these properties for the same toast instance being
broadcasted to multiple containers. The `toasterconfig` property has been removed from
`Toast` as a result to clean up the intent of the `Toast` interface. Closes
[#144](https://github.com/Stabzs/Angular2-Toaster/issues/144).


# 5.0.0-alpha.1 (2018-02-04)
### BREAKING CHANGES
* **angular2-toaster:** The library's Angular dependencies have been pinned to a minimum version of
Expand Down
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -3,10 +3,10 @@
**angular2-toaster** is an asynchronous, non-blocking, Ahead of Time Compilation-supported Angular Toaster Notification library
largely based off of [AngularJS-Toaster](https://github.com/jirikavi/AngularJS-Toaster).

[![npm](https://img.shields.io/npm/v/angular2-toaster.svg?maxAge=3600?cachedbust=true)](https://www.npmjs.com/package/angular2-toaster)
[![npm](https://img.shields.io/npm/dt/angular2-toaster.svg?cachedbust=true)](https://www.npmjs.com/package/angular2-toaster)
[![npm](https://img.shields.io/npm/v/angular2-toaster.svg?maxAge=3600?cache=true)](https://www.npmjs.com/package/angular2-toaster)
[![npm](https://img.shields.io/npm/dt/angular2-toaster.svg?cache=true)](https://www.npmjs.com/package/angular2-toaster)
[![Build Status](https://travis-ci.org/Stabzs/Angular2-Toaster.svg?branch=master)](https://travis-ci.org/Stabzs/Angular2-Toaster)
[![Coverage Status](https://coveralls.io/repos/github/Stabzs/Angular2-Toaster/badge.svg?branch=master&b=4.0.2)](https://coveralls.io/github/Stabzs/Angular2-Toaster?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/Stabzs/Angular2-Toaster/badge.svg?branch=master&b=5.0.0-beta.1)](https://coveralls.io/github/Stabzs/Angular2-Toaster?branch=master)


Version ^4.0.0 now supports `@angular/animations`, which is a breaking change. Please read both
Expand All @@ -31,12 +31,21 @@ npm install angular2-toaster
```html
<link rel="stylesheet" type="text/css" href="/node_modules/angular2-toaster/toaster.css" />
```
or
```html
<link rel="stylesheet" type="text/css" href="/node_modules/angular2-toaster/toaster.min.css" />
```

### Import CSS with Sass or Less
```scss
@import 'node_modules/angular2-toaster/toaster';
```

### Compile the Library's SCSS
```scss
@import 'node_modules/angular2-toaster/src/toaster';
```


## Import Library

Expand Down
2 changes: 1 addition & 1 deletion demo/angular-cli/README.md
Expand Up @@ -10,7 +10,7 @@ Due to local pathing support in order to test angular2-toaster locally, the foll

## Development server

Run `npm run start --aot` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Expand Down
3 changes: 1 addition & 2 deletions demo/angular-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion demo/angular-cli/src/app/app.component.ts
Expand Up @@ -8,6 +8,8 @@ import { ToasterConfig, IToasterConfig } from '@angular2-toaster/angular2-toaste
})
export class AppComponent {
appConfig: IToasterConfig = new ToasterConfig({
animation: 'fade', newestOnTop: false, positionClass: 'toast-top-left', toastContainerId: 1, timeout: 0, showCloseButton: true
animation: 'fade', newestOnTop: false, positionClass: 'toast-top-left',
toastContainerId: 1, timeout: 0, showCloseButton: true,
titleClass: 'title-1'
});
}
4 changes: 3 additions & 1 deletion demo/angular-cli/src/app/layout/layout.component.ts
Expand Up @@ -11,7 +11,9 @@ export class LayoutComponent implements OnInit {
constructor() { console.log('layout constructor called') }

layoutConfig: IToasterConfig = new ToasterConfig({
animation: 'fade', newestOnTop: false, positionClass: 'toast-top-right', toastContainerId: 2
animation: 'fade', newestOnTop: false,
positionClass: 'toast-top-right', toastContainerId: 2,
timeout: 0
});

ngOnInit() {}
Expand Down
2 changes: 1 addition & 1 deletion demo/angular-cli/src/app/routes/home/home.module.ts
Expand Up @@ -7,7 +7,7 @@ import { HomeComponent } from './home/home.component';
import { ToasterModule } from '@angular2-toaster/angular2-toaster';

const routes: Routes = [
{ path: '', component: HomeComponent }
{ path: '', component: HomeComponent }
];

@NgModule({
Expand Down
3 changes: 2 additions & 1 deletion demo/angular-cli/src/app/routes/home/home/home.component.ts
Expand Up @@ -11,7 +11,8 @@ export class HomeComponent {
constructor(public toasterService: ToasterService) {}

homeConfig: IToasterConfig = new ToasterConfig({
animation: 'fade', newestOnTop: false, positionClass: 'toast-bottom-center', toastContainerId: 4
animation: 'fade', newestOnTop: false,
positionClass: 'toast-bottom-center', toastContainerId: 4
});

popToast() {
Expand Down
2 changes: 2 additions & 0 deletions demo/angular-cli/src/app/routes/routes.module.ts
@@ -1,5 +1,6 @@
import { NgModule } from '@angular/core';
import {LayoutComponent} from "../layout/layout.component";
import {HomeModule} from './home/home.module';
import {HomeComponent} from './home/home/home.component';
import {SharedModule} from "../shared/shared.module";
import {RouterModule} from "@angular/router";
Expand All @@ -20,6 +21,7 @@ const routes = [

@NgModule({
imports: [
HomeModule,
SharedModule,
RouterModule.forRoot(routes),
],
Expand Down
Expand Up @@ -11,7 +11,12 @@ export class UsersComponent implements OnInit {
constructor(public toasterService: ToasterService) {}

config: IToasterConfig = new ToasterConfig({
animation: 'fade', newestOnTop: false, positionClass: 'toast-top-center', toastContainerId: 3
animation: 'fade',
newestOnTop: false,
positionClass: 'toast-top-center',
toastContainerId: 3,
titleClass: 'title-2',
timeout: 0
});

popToast() {
Expand Down
7 changes: 7 additions & 0 deletions demo/angular-cli/src/styles.css
@@ -1 +1,8 @@
/* You can add global styles to this file, and also import other style files */
.title-1 {
color: red;
}

.title-2 {
color: blue;
}

0 comments on commit f07690b

Please sign in to comment.