-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(dialog): enable support for html content in dialogs #4148
Conversation
@jelbourn, @robertmesserle - ready for review. |
@@ -6,7 +6,6 @@ angular.module('material.components.dialog', [ | |||
'material.core', | |||
'material.components.backdrop' | |||
]) | |||
.directive('mdDialog', MdDialogDirective) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just kidding.
@ThomasBurleson any reason for the <md-dialog-content >
<h2 class="md-title"></h2>
<div class="md-dialog-content-body" ></div>,
</md-dialog-content> |
@@ -436,7 +435,7 @@ function MdDialogProvider($$interimElementProvider) { | |||
} | |||
|
|||
/* @ngInject */ | |||
function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document, $window, $rootElement) { | |||
function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document, $window, $rootElement ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soon, clang will clean up that trailing space! Otherwise, I would complain.
…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.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
…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.
07b4a12
to
67ba621
Compare
CLAs look good, thanks! |
Closed with SHA 81e94b4 |
Enable support to specify HTML content for alert and confirm dialogs.
::onShow( )
now useswrapSimpleContent( )
to wrap simple strings in<p>
tagsshowConfirm( )
uses HTML span tag to illustrate use of HMTL contentmd-template
to safely inject HTML content into an elementBREAKING CHANGE: dialog content text is now injected into div.md-dialog-content-body
Before the template used was:
Now uses:
Fixes #1495.