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

Wait for scope bindings to be set before initializing component modals. #280

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ ModalService.showModal({
```


## Support for AngularJS 1.5.x Components
### Support for AngularJS 1.5.x Components

It's also possible to specify a component, rather than a template and controller. This can be done by providing a `component` and an optional `bindings` value to the `showModal` function.

Expand All @@ -157,6 +157,9 @@ ModalService.showModal({
})
```

**Disclaimer:** ModalService supports 1.5.x components by wrapping them in a custom-build template and passing in bindings via the controller's scope. This is not a perfect implementation, and is only intended to adhere to AngularJS best practices by avoiding controller/view flows.
As such, attribute (@) and output (&) bindings will not work correctly. Instead of defining an output binding, a function can be provided to the component via a 1-way binding (<).
([Issue 270](https://github.com/dwmkerr/angular-modal-service/issues/270))

### ShowModal Options

Expand Down
4 changes: 2 additions & 2 deletions dst/angular-modal-service.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dst/angular-modal-service.min.js

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

2 changes: 1 addition & 1 deletion dst/angular-modal-service.min.js.map

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

Loading