Popeye .openModal(options)

Creates a new PopeyeModal with the given options and opens it. This will cause any existing modals to close first before the new modal is resolved and then opened.

Returns the new PopeyeModal instance, which you'll usually want to hold on to.

By default, Popeye uses a containerTemplate that looks like this:

<div class="popeye-modal-container"> <div class="popeye-modal"> <a class="popeye-close-modal" href ng-click="$close()"></a> <-- your modal template is appended here --> </div> </div>

The default styles in popeye.css absolutely position the container to cover the entire window, centers the modal within that container, and positions the close link in the top right. You can, of course, override all of this with your own CSS, or change the containerTemplate to your own template if you prefer.

There are lots of options for opening a modal. If you've used ngRoute routes or ui-router states, you should find these options familiar: