-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-dialog: support .html()
for alert and confirm dialog?
#1495
Comments
Can't you use a custom template to create your own HTML? Alert and Confirm dialogs are meant to be presets. |
Yeah, but I think alert and confirm should be 'behavioural presets' mainly, leave the content customizable (text or html). |
@marcysutton what about allowing |
Since the $mdDialog uses
|
.hmtl()
for alert and confirm dialog?
+1. Was thinking to implement my own version of confirm dialog as I need to bold some text in a message. As 0.10 milestone is in rc stage now I'll wait for this issue to be fixed. |
Any news here? |
|
…alogs * dialog`::onShow( )` now uses `wrapSimpleContent( )` to wrap simple strings in `<p>` tags * dialog basic demo `showConfirm( )` uses HTML span tag to illustrate use of HMTL content * implemented generic `md-template` to safely inject HTML content into an element BREAKING CHANGE: dialog content text is now injected into **div.md-dialog-content-body** Before the template used was: ```html <md-dialog-content> <h2></h2> <p></p> </md-dialog-content> ``` Now uses: ```html <md-dialog-content> <h2></h2> <div class="md-dialog-content-body"> <p></p> </div> </md-dialog-content> ``` Fixes #1495.
…alogs * dialog`::onShow( )` now uses `wrapSimpleContent( )` to wrap simple strings in `<p>` tags * dialog basic demo `showConfirm( )` uses HTML span tag to illustrate use of HMTL content * implemented generic `md-template` to safely inject HTML content into an element BREAKING CHANGE: dialog content text is now injected into **div.md-dialog-content-body** Before the template used was: ```html <md-dialog-content> <h2></h2> <p></p> </md-dialog-content> ``` Now uses: ```html <md-dialog-content> <h2></h2> <div class="md-dialog-content-body"> <p></p> </div> </md-dialog-content> ``` Fixes #1495. Closes #4148.
…alogs * dialog`::onShow( )` now uses `wrapSimpleContent( )` to wrap simple strings in `<p>` tags * dialog basic demo `showConfirm( )` uses HTML span tag to illustrate use of HMTL content * implemented generic `md-template` to safely inject HTML content into an element BREAKING CHANGE: dialog content text is now injected into **div.md-dialog-content-body** Before the template used was: ```html <md-dialog-content> <h2></h2> <p></p> </md-dialog-content> ``` Now uses: ```html <md-dialog-content> <h2></h2> <div class="md-dialog-content-body"> <p></p> </div> </md-dialog-content> ``` Fixes #1495.
👍 Nice work! I'll be testing soon :) |
…alogs * dialog`::onShow( )` now uses `wrapSimpleContent( )` to wrap simple strings in `<p>` tags * dialog basic demo `showConfirm( )` uses HTML span tag to illustrate use of HMTL content * implemented generic `md-template` to safely inject HTML content into an element BREAKING CHANGE: dialog content text is now injected into **div.md-dialog-content-body** Before the template used was: ```html <md-dialog-content> <h2></h2> <p></p> </md-dialog-content> ``` Now uses: ```html <md-dialog-content> <h2></h2> <div class="md-dialog-content-body"> <p></p> </div> </md-dialog-content> ``` Fixes angular#1495.
In case anyone else wonders why they had this working in 0.11 and then it stopped working in 1.0: see 6a56450. |
Is there any specific reason why this has been removed? |
You can use htmlContent() |
.hmtl()
for alert and confirm dialog?.html()
for alert and confirm dialog?
@summerwish You are right. Thanks |
I don't want to clone an alert / confirm dialog template & controller only to add newlines.
I prefer adding
html()
method or addingnewline
filter to alert & confirm dialog.What do you think?
The text was updated successfully, but these errors were encountered: