Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README.md formatting #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ By passing the time-out configuration as an object instead of a number, you can
If a type is not defined and specified, a timeout will not be applied, making the toast "sticky".

* Per toast constructed via toaster.pop('success', "title", "text"):
```html
```js
toaster.pop({
type: 'error',
title: 'Title text',
Expand Down Expand Up @@ -149,7 +149,7 @@ By passing the close-button configuration as an object instead of a boolean, you
If a type is not defined and specified, the default behavior for that type is false.

* Per toast constructed via toaster.pop('success', "title", "text"):
```html
```js
toaster.pop({
type: 'error',
title: 'Title text',
Expand Down Expand Up @@ -220,27 +220,28 @@ There are five types of body renderings: 'html', 'trustedHtml', 'template', 'tem
};
}])
```

- Will use the `toast.directiveData` argument to accept data that will be bound to the directive's scope. The directive cannot use isolateScope and will
throw an exception if isolateScope is detected. All data must be passed via the directiveData argument.

```js
```js
// The toast pop call, passing in a directive name to be rendered
toaster.pop({
type: 'info',
body: 'bind-name',
bodyOutputType: 'directive',
directiveData: { name: 'Bob' }
});
```
```

```js
```js
// The directive that will be dynamically rendered
.directive('bindName', [function () {
return {
template: "<span style='color:orange'>Hi {{directiveData.name}}!</span>"
};
}])
```
```

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

Expand Down