Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Modal - backdrop class #1232

Closed
davidwparker opened this issue Nov 5, 2013 · 1 comment
Closed

Modal - backdrop class #1232

davidwparker opened this issue Nov 5, 2013 · 1 comment

Comments

@davidwparker
Copy link

I'd like for there to be a way to easily add a backdrop class, in the same vein as the windowClass is added to the modal itself.

The class itself could be easily added to backdrop.html:

class="modal-backdrop fade {{ backdropClass }}"

And then the only changes required would be in the modal.js:

.directive('modalBackdrop', ['$modalStack', '$timeout', function ($modalStack, $timeout) {
    return {
      restrict: 'EA',
      replace: true,
      templateUrl: 'template/modal/backdrop.html',
      link: function (scope, element, attrs) {
        scope.backdropClass = attrs.backdropClass || '';

I'm sure there may be a few more changes in modal.js, as I'm not entirely sure how $modalStack works.

Thoughts?

@davidwparker
Copy link
Author

d'oh. Of course I just found this:
#1179

See his solution here:
https://gist.github.com/fxck/7028338

I'm pretty sure you wouldn't want to just reuse windowClass though and would probably want something like backdropClass

via the modal class thread:
#892

Closing... feel free to mark as duplicate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant