Skip to content

Commit

Permalink
withAlert() and withConfirm() renders "content" as HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
kctang committed Jun 21, 2019
1 parent db23cf0 commit 76e3c8c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.

- ...

## [0.1.4] - 2019-06-21

### Changed

- `withAlert()` and `withConfirm()` renders `content` as HTML.

## [0.1.3] - 2019-06-04

### Changed
Expand Down Expand Up @@ -44,7 +50,8 @@ All notable changes to this project will be documented in this file.
### Fixed
- Fix "Cannot find module '@angular-mdc/web'" ([#1](kctang/dialog-service#1))

[Unreleased]: https://github.com/kctang/dialog-service/compare/v0.1.3...HEAD
[Unreleased]: https://github.com/kctang/dialog-service/compare/v0.1.4...HEAD
[0.1.4]: https://github.com/kctang/dialog-service/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/kctang/dialog-service/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/kctang/dialog-service/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/kctang/dialog-service/compare/v0.1.0...v0.1.1
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"highlight.js": "^9.15.6",
"ng-quick-form": "^0.0.5",
"ng-quick-form": "^0.0.14",
"ngx-highlightjs": "^3.0.3",
"rxjs": "~6.5.2",
"tslib": "^1.9.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/dialog-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dialog-service",
"version": "0.1.3",
"version": "0.1.4",
"description": "Reactive Angular modal dialogs. Create alert, confirmation, progress and form based dialogs without writing component templates.",
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion projects/dialog-service/src/lib/mat/Alert.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h1 mat-dialog-title>{{data.title}}</h1>
<div mat-dialog-content *ngIf="data.content">{{data.content}}</div>
<div mat-dialog-content *ngIf="data.content">
<div [innerHtml]="data.content" class="content"></div>
</div>
<div mat-dialog-actions>
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>{{data.acceptButton}}</button>
</div>
4 changes: 3 additions & 1 deletion projects/dialog-service/src/lib/mat/Confirm.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h1 mat-dialog-title>{{data.title}}</h1>
<div mat-dialog-content *ngIf="data.content">{{data.content}}</div>
<div mat-dialog-content *ngIf="data.content">
<div [innerHtml]="data.content" class="content"></div>
</div>
<div mat-dialog-actions>
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>{{data.acceptButton}}</button>
<button mat-button [mat-dialog-close]="false">{{data.cancelButton}}</button>
Expand Down
13 changes: 8 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
],
"paths": {
"dialog-service": [
"dist/dialog-service"
],
"dialog-service/*": [
"dist/dialog-service/*"
"projects/dialog-service/src/public_api"
]
// "dialog-service": [
// "dist/dialog-service"
// ],
// "dialog-service/*": [
// "dist/dialog-service/*"
// ]
}
}
}
}

0 comments on commit 76e3c8c

Please sign in to comment.