Skip to content

Commit 9286920

Browse files
authored
docs(README): Add Angular compatibility details, cleanup (#40)
- Add Angular compatibility table - Cleanup sections - Enhance spacing
1 parent 26992ac commit 9286920

File tree

1 file changed

+24
-51
lines changed

1 file changed

+24
-51
lines changed

README.md

Lines changed: 24 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,48 @@
66

77
[![npm version](https://img.shields.io/npm/v/angular-notifier.svg?maxAge=3600&style=flat)](https://www.npmjs.com/package/angular-notifier)
88
[![dependency status](https://img.shields.io/david/dominique-mueller/angular-notifier.svg?maxAge=3600&style=flat)](https://david-dm.org/dominique-mueller/angular-notifier)
9-
[![peer dependency status](https://img.shields.io/david/peer/dominique-mueller/angular-notifier.svg?maxAge=3600&style=flat)](https://david-dm.org/dominique-mueller/angular-notifier?type=peer)
109
[![travis ci build status](https://img.shields.io/travis/dominique-mueller/angular-notifier/master.svg?maxAge=3600&style=flat)](https://travis-ci.org/dominique-mueller/angular-notifier)
1110
[![Codecov](https://img.shields.io/codecov/c/github/dominique-mueller/angular-notifier.svg?maxAge=3600&style=flat)](https://codecov.io/gh/dominique-mueller/angular-notifier)
1211
[![Known Vulnerabilities](https://snyk.io/test/github/dominique-mueller/angular-notifier/badge.svg)](https://snyk.io/test/github/dominique-mueller/simple-progress-webpack-plugin)
1312
[![license](https://img.shields.io/npm/l/angular-notifier.svg?maxAge=3600&style=flat)](https://github.com/dominique-mueller/angular-notifier/LICENSE)
1413

1514
</div>
1615

17-
<br>
16+
<br><br>
1817

1918
## Demo
2019

2120
You can play around with this library with **[this Plunker right here](https://plnkr.co/edit/b3xiPr?p=preview)**.
2221

2322
![Angular Notifier Animated Preview GIF](/docs/angular-notifier-preview.gif?raw=true)
2423

25-
<br>
24+
<br><br><br>
2625

27-
## Table of Contents
26+
## How to install
2827

29-
- **[How to install](#how-to-install)**
30-
- **[How to setup](#how-to-setup)**
31-
- **[How to use](#how-to-use)**
32-
- **[How to customize](#how-to-customize)**
33-
- **[What's next?](#whats-next)**
28+
You can get **angular-notifier** via **npm** by either adding it as a new *dependency* to your `package.json` file and running npm install,
29+
or running the following command:
3430

35-
> Also, see the **[Changelog](/CHANGELOG.md)** as well as at the **[MIT License](/LICENSE)**. Or **[learn about me](#creator)**.
31+
``` bash
32+
npm install angular-notifier
33+
```
3634

37-
<br><br>
35+
<br>
3836

39-
## How to install
37+
### Angular versions
4038

41-
To get **angular-notifier** via **npm**, simply add it as a new dependency to your `package.json` file and run `npm install`. Alternatively, install it directly by running:
39+
The following list describes the Angular compatibility:
4240

43-
``` bash
44-
npm install angular-notifier --save
45-
```
41+
- **angular-notifier `1.x`**&nbsp;&nbsp;is compatible with&nbsp;&nbsp;**Angular `2.x`**
42+
- **angular-notifier `2.x`**&nbsp;&nbsp;is compatible with&nbsp;&nbsp;**Angular `4.x`**
43+
- **angular-notifier `3.x`**&nbsp;&nbsp;is compatible with&nbsp;&nbsp;**Angular `5.x`**
4644

4745
<br>
4846

49-
### Browser Support & Polyfills
47+
### Browser support & polyfills
5048

51-
By default, meaning without any polyfills, **angular-notifier** should be compatible with **the latest versions of Chrome, Firefox, and
52-
Opera**. Bringing in the following polyfills will extend the browser support:
49+
By default, meaning without any polyfills, **angular-notifier** is compatible with **the latest versions of Chrome, Firefox, and Opera**.
50+
Bringing in the following polyfills will improve browser support:
5351

5452
- To be able to use the latest and greatest JavaScript features in older browsers (e.g. older version of IE & Safari), you might want to
5553
add **[core-js](https://github.com/zloirock/core-js)** to your polyfills.
@@ -62,7 +60,7 @@ add **[core-js](https://github.com/zloirock/core-js)** to your polyfills.
6260
Angular project with the **[Angular CLI](https://github.com/angular/angular-cli)**, all the polyfills mentioned above do already exist in
6361
your `polyfills.ts` file - waiting for you to enable and install them.
6462

65-
<br><br>
63+
<br><br><br>
6664

6765
## How to setup
6866

@@ -105,7 +103,7 @@ export class AppModule {}
105103

106104
<br>
107105

108-
### 2. Add the `notifier-container` component
106+
### 2. Use the `notifier-container` component
109107

110108
In addition, you have to place the `notifier-container` component somewhere in your application, best at the last element of your
111109
root (app) component. For example:
@@ -133,7 +131,7 @@ write your own styles from scratch.
133131

134132
#### The easy way: Import all the styles
135133

136-
To import all the styles, simple include either the `~/angular.notifier/styles.(scss|css)` file. It contains the core styles as well as all
134+
To import all the styles, simple include either the `~/angular-notifier/styles.(scss|css)` file. It contains the core styles as well as all
137135
the themes and notification types.
138136

139137
#### The advanced way: Only import the styles actually needed
@@ -145,7 +143,7 @@ the styles actually needed by our application. The **angular-notifier** styles a
145143
- Themes can be imported from the `~/angular-notifier/styles/theme` folder
146144
- The different notification types, then, can be imported from the `~/angular-notifier/styles/types` folder
147145

148-
<br><br>
146+
<br><br><br>
149147

150148
## How to use
151149

@@ -156,7 +154,7 @@ service, ...) you want to use in. For example:
156154
import { NotifierService } from 'angular-notifier';
157155

158156
@Component( {
159-
// Implementation details
157+
// ...
160158
} )
161159
export class MyAwesomeComponent {
162160

@@ -228,7 +226,7 @@ And, of course, it's also possible to hide all visible notifications at once:
228226
this.notifier.hideAll();
229227
```
230228

231-
<br><br>
229+
<br><br><br>
232230

233231
## How to customize
234232

@@ -493,32 +491,7 @@ const notifierDefaultOptions: NotifierOptions = {
493491
};
494492
```
495493

496-
<br><br>
497-
498-
## What's next?
499-
500-
There is an endless number of features, enhancements, and optimizations that would be possible (and awesome to have) in the
501-
**angular-notifier** library. Some ideas:
502-
503-
* Extended options for all - and even single - notifications
504-
* Symbol for notifications (e.g. checkmark, cross, or even images)
505-
* Custom buttons next to the close button (with callback functionality)
506-
* Callback functions / observable streams for specific events / global events
507-
* Enhanced stacking (e.g. negative values, document size as implicit stacking limit)
508-
* Allowing the change of content from outside (e.g. while the notifications is still on-screen)
509-
* Allow custom animation presets, configurable from outside (similar to that creating custom themes is possible)
510-
* More themes coming along with **angular-notifier** (e.g. iOS style, MDL style, bootstrap style)
511-
* HTML templates as notification content
512-
* React on document size changes (full responsiveness)
513-
* Pull Request Templates, Contributing Guidelines
514-
* Refactor unit tests
515-
516-
> You can't wait for one of these features? Or have some new ideas? Let me know by **[creating an issue](https://github.com/dominique-mueller/angular-notifier/issues/new)**. Contributions are of course welcomed at any time!
517-
518-
*Or look at one of the alternative notification libraries for Angular. A great collection can be found
519-
__[right here](https://github.com/brillout/awesome-angular-components#notification)__.*
520-
521-
<br><br>
494+
<br><br><br>
522495

523496
## Creator
524497

0 commit comments

Comments
 (0)