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

fix(modal): close and dismiss bindings on a component modal #6192

Closed
wants to merge 1 commit into from
Closed

fix(modal): close and dismiss bindings on a component modal #6192

wants to merge 1 commit into from

Conversation

navarroaxel
Copy link
Contributor

fix issue #6191

The modalScope has the methods $close and $dismiss.

/src/modal/modal.js line 736

modalScope.$close = modalInstance.close;
modalScope.$dismiss = modalInstance.dismiss;

@navarroaxel
Copy link
Contributor Author

navarroaxel commented Aug 21, 2016

Also I have found an issue with this expect:

expect(modal.result).toBeResolvedWith('baz');

The matcher toBeResolvedWith only fails when the promise is called with a wrong value.

The matcher toBeResolvedWith don't fail when the promise is not resolved!

@wesleycho wesleycho added this to the 2.1.2 milestone Aug 21, 2016
@wesleycho
Copy link
Contributor

Oof, those were some careless mistakes by me...

I see the issue with the matchers - I will fix those shortly. Thanks for these catches!

@wesleycho wesleycho closed this in 3e8ecff Aug 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants