2

I have an modal

<div bsModal #largeModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title pull-left">Create Goal</h4> </div> <div class="modal-body"> <p>Modal body text</p> </div> </div> </div> </div> 

and I am using http://valor-software.com/ngx-bootstrap/#/modals#modal-directive

but I cant figure out how to react on the directive outputs such as onHide/onShow etc.

I would like to do some processing when the modal is hidden for example.

1 Answer 1

3

you can add listen to output events. for example 'onHidden'

<div bsModal #largeModal="bs-modal" (onHidden)="onHidden()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title pull-left">Create Goal</h4> </div> <div class="modal-body"> <p>Modal body text</p> </div> </div> </div> </div> 

when ever your model hidden it will execute onHidden Function.

In the file Component add onHidden() function.

public onHidden() { // do our stuff } 
Sign up to request clarification or add additional context in comments.

1 Comment

Exactly what I was looking for, thanks! Are the 'keywords' then: onHidden, onHide, onShow, onShown, onLoaded?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.