Important: please check angular-cli
version, it should be => "1.0.0-beta.24"
Note: you can skip this part if you already have application generated by ng-cli
and webpack
npm i -g angular-cli
ng new my-app
cd my-app
ng serve
- install
ngx-md
npm install ngx-md --save
- open
src/app/app.module.ts
and add
import { NgxMdModule } from 'ngx-md';
...
@NgModule({
...
imports: [NgxMdModule.forRoot(), ... ],
...
})
- open '.angular-cli.json' and add
"styles": [
"styles.css",
+ "../node_modules/prismjs/themes/prism-okaidia.css"
],
you can choose any other theme.
- open
src/app/app.component.html
and add
<ngx-md>
## Markdown h2 content
</ngx-md>