---
title: "Discussion on \"Render your markdown file in Angular with ngx-markdown and HttpClient\" | Hashnode"
description: "Discussion on \"Render your markdown file in Angular with ngx-markdown and HttpClient\". Hi everyone. In this article I want to show you how to render markdown content on your website or application from local .md files using ngx-markdown library with HttpClient service in Angular.\nngx-markdown is an Angular library that combines:\n\nMarke..."
url: "https://hashnode.com/posts/render-your-markdown-file-in-angular-with-ngx-markdown-and-httpclient/610ec840528eff11aea8a0ef"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Render your markdown file in Angular with ngx-markdown and HttpClient](https://mbosnjak.hashnode.dev/render-your-markdown-file-in-angular-with-ngx-markdown-and-httpclient?utm_source=hashnode&utm_medium=feed)

Hi everyone. In this article I want to show you how to render markdown content on your website or application from local .md files using ngx-markdown library with HttpClient service in Angular. ngx-markdown is an Angular library that combines: Marke...

Aug 7, 2021 · 5 min read · mbosnjak.hashnode.dev  
Read the article

-   [#angular](https://hashnode.com/tag/angular)
-   [#markdown](https://hashnode.com/tag/markdown)

## Written by

[Matej Bošnjak](https://hashnode.com/@mbosnjak)

@mbosnjak · Croatia

  
[View profile](https://hashnode.com/@mbosnjak)

Web developer, blogger, cyclist and chess player

I am developer from Croatia. With high interest in web development, blogging and exploring new stuff, I am also cyclists and chess player. Feel free to reach out :)

## Responses 1

Markdown supported · ⌘↵ to post

[Phil Jollans](https://hashnode.com/@PhilJollans)

[Sep 23, 2023](https://hashnode.com/posts/render-your-markdown-file-in-angular-with-ngx-markdown-and-httpclient/610ec840528eff11aea8a0ef/comment/650ecd3b2f56b93c1e0732c4)

Hi Matej,

I'm a bit confused about how you are using the markdown component. You are (1) loading the markdown file (2) calling MarkdownService.compile and (3) showing the content with the <markdown> component.

My understanding is, that the <markdown> component would compile the markdown text internally, so there is no need to call the compile method.

If you call compile, it generates HTML which you can display by setting the innerHtml of a <div> without using the <markdown> tag at all, for example

```
<div [innerHtml]="markdown"></div>
```

Or am I misunderstanding the ngx-markdown component?

Phil
