-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[dialog/modal] Transclude issue with bootstrap 0.2 #201
Comments
@ffesseler Your plunker works fine for me (Chrome). I mean, I can open a modal, see the content without any errors in the console. What is the browser your are using? Having said the above I would suggest looking at the |
Just to be sure ... the plunker uses UI bootsrap 0.1 by default so it's expected that the modal works when you open it. However, it will fail when you switch to 0.2. I'll check that $dialog service, thanks |
any update on this? |
Hi @ffesseler So I am pretty sure that the transcluded content that you have created with your directive is being lost. I think we may be able to fix this by allowing $dialog to take a transclude function as an alternative to a template. @pkozlowski-opensource, @SidhNor & @ajoslin - does this sound right? |
@petebacondarwin Actually the more I look into the modal & dialog code I more think that the "root of all evil" is here: As of today we are creating DOM elements by hand and also switching "open" class in JavaScript code. I more and more think that we should create a template for this, sth like: IMO it would have following benefits:
WDYT? |
@ffesseler we are going to cover this use case in the (hopefully near!) feature but as you can see we are trying to figure out the best API. You are second person that as for this feature so there is something here. But we want to make sure that we evolve in the right direction In the mean time I would really, really encourage you to look into the Would be awesome if you could give it a try and let us know if this works for you. Also, would be great if you could share with us why you would prefer the |
Actually, I've used the modal directive because I was not aware of that $dialog service :-) In the mean time, looking at your plunker, creating a custom service wrapping the $dialog service won't solve my problem I think. As a reminder, here is my use case : If you look at my plunker, this is what I achieved. However, that worked with 0.1 and not any more with 0.2. |
It will be handled in #441 |
ah, fantastic! |
Hi, I recently found out that '$dialog' is missing from Ui-bootstrap- 0.6.0 version. I know that I can potentially achieve the same functionality with $modal service. But I had started using $dialog a couple months back and baked it quite well into our application. Is there a possibility to have $dialog back with the same functionality in future ui-bootstrap versions? |
@shwetasingh nope, we are not planning on adding back $dialog, it got replaced with $modal as $dialog had number of API / implementation issues. The library is a version 0.6.0 now so you need to expect API breaking changes, I'm affraid. |
@pkozlowski-opensource Thank you! I updated to version tpls-0.6.0. But we are still on Angular JS v1.0.7 |
I've made a custom directive on top of ui bootstrap modal directive so I can use the same modal template everywhere in my app.
Please see this example :
http://plnkr.co/edit/2K0SRC?p=preview
It works well with bootstrap 0.1. However if I use bootstrap 0.2 instead, I get this error
The text was updated successfully, but these errors were encountered: