angular-marked
### What?
Convert markdown to html at run time.
#### For example, this:
```html
<textarea ng-model="my_markdown" cols="60" rows="5"></textarea>
<div marked="my_markdown"></div>
```
#### Becomes this:
### Why?
I wanted to use [marked](https://github.com/chjj/marked) instead of [showdown](https://github.com/coreyti/showdown) as used in [angular-markdown-directive](https://github.com/btford/angular-markdown-directive) as well as expose the option to globally set defaults.
### How?
#### Set default options
```js
app.config(['markedProvider', function(markedProvider) {
markedProvider.setOptions({gfm: true});
}]);
```
#### A block of text:
```html
<marked>
#Markdown directive
*It works!*
</marked>
```
#### Bind the markdown input to a scope variable:
```html
<div marked="my_markdown"></div>
<!-- Uses $scope.my_markdown -->
```
#### Include a markdown file:
```html
<marked src="'README.md'"></marked>
<!-- Uses markdown content from README.md -->
```
#### Use the compile flag:
```html
<marked compile="true">
`{{1 + 2}}` = {{1 + 2}}
</marked>
```