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

Modal - component modal bindings close and dismiss are not working #6191

@navarroaxel

Description

@navarroaxel

Bug description:

The binding for close and dismiss methods are incorrect and it's not working:

angular.module('ui.bootstrap.demo').component('modalComponent', {
  bindings: {
    resolve: '<',
    close: '&',
    dismiss: '&'
  },
  controller: function () {
    this.close({$value: 'foo'});
  }
}

when I call the method close the modal is not closing and the result promise is not resolved:

$uibModal.open({component: 'modalComponent'}).result.then(function(value) {
    console.log(value);
})

Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/Z2KXdH?p=preview

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.8

UIBS: 2.1.1

Bootstrap: 3.3.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions