Closed DougKeller closed 5 years ago
Merging #266 into master will increase coverage by
2.31%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #266 +/- ##
==========================================
+ Coverage 86.23% 88.54% +2.31%
==========================================
Files 1 1
Lines 109 131 +22
==========================================
+ Hits 94 116 +22
Misses 15 15
Impacted Files | Coverage Δ | |
---|---|---|
src/angular-modal-service.js | 88.54% <100%> (+2.31%) |
: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 2879036...8743343. Read the comment docs.
This is excellent @DougKeller - I can't wait to get this working with Angular X. I'm cloning the PR locally and running some tests, will get back to you soon!
Glad you like it! Just to clarify, I'm not sure that this will work with Angular X components, however it allows existing AngularJS modals to use AngularJS 1.5.x components rather than controllers, which will hopefully make it easier to switch to some sort of component-based Angular X modal service in the future.
Sorry for the delay Doug - it's in, it's published, thanks so much for your contributions!
Our team is preparing for our transition from AngularJS to Angular X. As part of this process, we've begun componentizing as many things as we can.
AngularModalService does not support AngularJS 1.5.x+ components. This PR aims to change that.
New modal options:
component
controller
andtemplate
values to theoptions
object to eliminate the need to define these manually.bindings
component
option is provided,bindings
will be bound to the generated template as binding attributes, and will be assigned to the dynamically-created controller's scope in order to provide these values to the component.I've added tests, documentation, and comments describing this change. It will not have an effect on any existing usage of this ModalService.
Example usage:
This will display a new modal with
myComponent
as the template and all values specified by thebindings
option will be forwarded the the rendered component.