Closed DougKeller closed 5 years ago
Merging #257 into master will increase coverage by
0.27%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #257 +/- ##
==========================================
+ Coverage 85.04% 85.32% +0.27%
==========================================
Files 1 1
Lines 107 109 +2
==========================================
+ Hits 91 93 +2
Misses 16 16
Impacted Files | Coverage Δ | |
---|---|---|
src/angular-modal-service.js | 85.32% <100%> (+0.27%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 22cda41...1d6bc14. Read the comment docs.
Awesome! One minor comment, otherwise looks great! Thanks for the tests too.
@dwmkerr Added that comment. Let me know if there's anything else - otherwise thanks for reviewing this quickly!
Also, this PR addresses #173 so that can be resolved once this is merged. I didn't realize this issue already had a similar PR (#190) before submitting it.
Thanks so much for this @DougKeller! I've just released now, version 0.15.1
. Sorry for the delay, busy week! I'll check the other PR and Issue you mentioned and close them too. Cheers!
https://docs.angularjs.org/guide/component#component-based-application-architecture
1.6.x introduced many mechanisms to help AngularJS 1.X projects begin conforming with Angular 2+'s component-based structure. Referencing the link above:
One of the most useful hooks defined is the
$onInit
hook, which is run after the element has been constructed. An additional perk of this hook is that it can be tested individually without having to mock out any setup the controller has to do once it has been initialized.Because AngularModalService manually initializes the modal's controller, this lifecycle hook is never invoked. This pull request checks that the initialized controller defines an
$onInit
function, and if it does, calls it before resolving the modal.