Skip to content

Commit

Permalink
Add note about potential template whitespace issues (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshields authored and jfcere committed May 7, 2018
1 parent 297d9df commit 4c399fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ export class HomeModule { }
You can use `markdown` component to either parse static markdown directly from your html markup, load the content from a remote url using `src` property or bind a variable to your component using `data` property. You can get a hook on loading error using `error` output event property.

```html
<!-- static markdown -->
<markdown>
<!-- static markdown in templates -->
<!-- Note: as of Angular v6, the template compiler strips whitespace by default.
Use the ngPreserveWhitespaces directive to preserve whitespace such as newlines
in order for the Markdown-formatted content to render as intended. -->
<markdown ngPreserveWhitespaces>
# Markdown
</markdown>

Expand Down

0 comments on commit 4c399fb

Please sign in to comment.