ng-marked
v0.1.1
Published
>Based on [Marked](https://github.com/markedjs/marked)
Downloads
5
Readme
ng-marked
Based on Marked
Installation
$ yarn add ng-marked
Usage
// app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgMarkedModule } from 'ng-marked';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgMarkedModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
// app.component.ts
import { Component } from '@angular/core';
import { NgMarkedOptions, NgMarked, NgMarkedService } from 'ng-marked';
@Component({
selector: 'app-root',
template: `
<ng-marked [src]="src" [opt]="opt"></ng-marked>
`
})
export class AppComponent {
src = '# test';
opt: NgMarkedOptions = {};
marked: NgMarked;
constructor(
private readonly _ngMarkedService: NgMarkedService
) {
this.marked = _ngMarkedService.marked;
}
}
Docs
See the Marked Github repo github for more details.