Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.angular/cache
# Node
node_modules/*
**/node_modules/*
npm-debug.log

# TypeScript
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Angular2-Notifications

> A light and easy to use notifications library for Angular 2. ~~It features both regular page notifications (toasts) and push notifications.~~
> A light and easy to use notifications library for Angular 2. ~~It features both regular page notifications (toasts) and push notifications.~~

[![Build Status](https://travis-ci.org/flauc/angular2-notifications.svg?branch=master)](https://travis-ci.org/flauc/angular2-notifications)
[![NPM Version](https://img.shields.io/npm/v/angular2-notifications.svg)](https://www.npmjs.com/package/angular2-notifications)
Expand Down Expand Up @@ -65,8 +65,6 @@ import { SimpleNotificationsModule } from 'angular2-notifications';
@NgModule({
imports: [
BrowserModule,
// Animations need to be imported in to your project to use the library
BrowserAnimationsModule,
SimpleNotificationsModule.forRoot()
],
declarations: [AppComponent],
Expand Down Expand Up @@ -124,15 +122,15 @@ The `title`, `content` and `html` arguments can be a string, html string or `Tem

### Example using `TemplateRef`

To use a `TemplateRef` in the title or content you need to create it in a component template:
To use a `TemplateRef` in the title or content you need to create it in a component template:

```html
<ng-template #example let-title="title">
<p>{{title}}</p>
</ng-template>
```

Then you need to somehow get it to the component:
Then you need to somehow get it to the component:

```ts
title: string = 'Winter is coming';
Expand Down Expand Up @@ -215,7 +213,7 @@ This are the current options that can be set globally:

Option | Type | Default | Description |
------------ | ------------- | ------------- | -------------
__position__ | ["top" or "bottom" or "middle", "right" or "left" or "center"] | ["bottom", "right"] | Set the position on the screen where the notifications should display. Pass an array with two values example: ["top", "left"].
__position__ | ["top" or "bottom" or "middle", "right" or "left" or "center"] | ["bottom", "right"] | Set the position on the screen where the notifications should display. Pass an array with two values example: ["top", "left"].
__timeOut__ | int | 0 | Determine how long a notification should wait before closing. If set to 0 a notification won't close it self.
__showProgressBar__ | boolean | true | Determine if a progress bar should be shown or not.
__pauseOnHover__ | boolean | true | Determines if the timeOut should be paused when the notification is hovered.
Expand Down Expand Up @@ -300,4 +298,4 @@ $ npm run lint

## License

MIT © [Filip Lauc](mailto:filip.lauc93@gmail.com)
MIT © [Filip Lauc](mailto:filip.lauc93@gmail.com)
Loading