Skip to content

Commit b07ad09

Browse files
authored
Merge pull request #281 from jirikavi/release/v3.0.0
Release/v3.0.0
2 parents dbe2539 + 14796bc commit b07ad09

9 files changed

+4724
-59
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "4.1"
3+
- "7"
44
before_install:
55
- export CHROME_BIN=chromium-browser
66
- export DISPLAY=:99.0

README.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
AngularJS-Toaster
22
=================
33

4-
**AngularJS Toaster** is an AngularJS port of the **toastr** non-blocking notification jQuery library. It requires AngularJS v1.2.6 or higher and angular-animate for the CSS3 transformations.
4+
**AngularJS Toaster** is an AngularJS port of the **toastr** non-blocking notification jQuery library. It requires AngularJS v1.2.6 or higher and angular-animate for the CSS3 transformations. `angular-sanitize` is required if using the `html` bodyOutputType.
55

66
[![Build Status](https://travis-ci.org/jirikavi/AngularJS-Toaster.svg)](https://travis-ci.org/jirikavi/AngularJS-Toaster)
7-
[![Coverage Status](https://coveralls.io/repos/jirikavi/AngularJS-Toaster/badge.svg?branch=master&service=github&bust=12)](https://coveralls.io/github/jirikavi/AngularJS-Toaster?branch=master)
7+
[![Coverage Status](https://coveralls.io/repos/jirikavi/AngularJS-Toaster/badge.svg?branch=master&service=github&bust=3.0.0)](https://coveralls.io/github/jirikavi/AngularJS-Toaster?branch=master)
88

9-
### Current Version 2.2.0
9+
### Current Version 3.0.0
1010

1111
## Angular Compatibility
12-
AngularJS-Toaster requires AngularJS v1.2.6 or higher and specifically targets AngularJS, not Angular 2, although it could be used via ngUpgrade.
13-
If you are looking for the Angular 2 port of AngularJS-Toaster, it is located [here](https://github.com/Stabzs/Angular2-Toaster).
12+
AngularJS-Toaster requires AngularJS v1.2.6 or higher and specifically targets AngularJS, not Angular 2-7, although it could be used via ngUpgrade.
13+
If you are looking for the Angular 2-7 port of AngularJS-Toaster, it is located [here](https://github.com/Stabzs/Angular2-Toaster).
1414

1515
## Demo
1616
- Simple demo using the current version is at http://plnkr.co/edit/Esrdbl5S6hcmhiVmSjiF?p=preview
@@ -32,10 +32,10 @@ npm install --save angularjs-toaster
3232
* Link scripts:
3333

3434
```html
35-
<link href="https://cdnjs.cloudflare.com/ajax/libs/angularjs-toaster/1.1.0/toaster.min.css" rel="stylesheet" />
35+
<link href="https://cdnjs.cloudflare.com/ajax/libs/angularjs-toaster/3.0.0/toaster.min.css" rel="stylesheet" />
3636
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js" ></script>
3737
<script src="https://code.angularjs.org/1.2.0/angular-animate.min.js" ></script>
38-
<script src="https://cdnjs.cloudflare.com/ajax/libs/angularjs-toaster/1.1.0/toaster.min.js"></script>
38+
<script src="https://cdnjs.cloudflare.com/ajax/libs/angularjs-toaster/3.0.0/toaster.min.js"></script>
3939
```
4040

4141
* Add toaster container directive:
@@ -185,11 +185,12 @@ The close button html can be overridden either globally or per toast call.
185185
### Body Output Type
186186
The rendering of the body content is configurable at both the Global level, which applies to all toasts, and the individual toast level when passed as an argument to the toast.
187187

188-
There are four types of body renderings: 'trustedHtml', 'template', 'templateWithData', 'directive'.
188+
There are five types of body renderings: 'html', 'trustedHtml', 'template', 'templateWithData', 'directive'.
189+
190+
- html: When using this configuration, the toast will bind the toast.html to `ng-bind-html`. If the `angular-sanitize` library is not loaded, an exception will be thrown.
189191

190192
- trustedHtml: When using this configuration, the toast will parse the body content using
191-
`$sce.trustAsHtml(toast.body)`.
192-
If the html can be successfully parsed, it will be bound to the toast via `ng-bind-html`. If it cannot be parsed as "trustable" html, an exception will be thrown.
193+
`$sce.trustAsHtml(toast.body)`. It will bypass any sanitization. Only use this option if you own and trust the html content!
193194

194195
- template: Will use the `toast.body` if passed as an argument, else it will fallback to the template bound to the `'body-template': 'toasterBodyTmpl.html'` configuration option.
195196

@@ -243,7 +244,7 @@ There are four types of body renderings: 'trustedHtml', 'template', 'templateWit
243244

244245
There are additional documented use cases in these [tests](test/directiveTemplateSpec.js).
245246

246-
All four options can be configured either globally for all toasts or individually per toast.pop() call. If the `body-output-type` option is configured on the toast, it will take precedence over the global configuration for that toast instance.
247+
All five options can be configured either globally for all toasts or individually per toast.pop() call. If the `body-output-type` option is configured on the toast, it will take precedence over the global configuration for that toast instance.
247248

248249
- Globally:
249250

@@ -396,14 +397,14 @@ If you do not want to use animations, you can safely remove the angular-animate.
396397
}, 0);
397398
```
398399

399-
## Author
400-
**Jiri Kavulak**
400+
## Authors
401+
**Jiri Kavulak, Stabzs**
401402

402403
## Credits
403404
Inspired by http://codeseven.github.io/toastr/demo.html.
404405

405406
## Copyright
406-
Copyright © 2013-2016 [Jiri Kavulak](https://twitter.com/jirikavi).
407+
Copyright © 2013-2019 [Jiri Kavulak](https://twitter.com/jirikavi), [Stabzs](https://github.com/Stabzs).
407408

408409
## License
409410
AngularJS-Toaster is under MIT license - http://www.opensource.org/licenses/mit-license.php

karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = function (config) {
1616
// list of files / patterns to load in the browser
1717
files: [
1818
'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js',
19+
'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-sanitize.js',
1920
'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-mocks.js',
2021
'toaster.js',
2122
'test/**/*Spec.js'

0 commit comments

Comments
 (0)