Skip to content

Commit 7aa2d1a

Browse files
committed
demo(app): enhanced the getting started module to render the readme of the library
1 parent c0d386d commit 7aa2d1a

File tree

5 files changed

+177
-57
lines changed

5 files changed

+177
-57
lines changed

demo/package-lock.json

Lines changed: 167 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@
3333
"bootstrap": "^4.1.3",
3434
"core-js": "^2.5.4",
3535
"font-awesome": "^4.7.0",
36+
"ngx-markdown": "^6.1.0",
3637
"rxjs": "^6.0.0",
3738
"zone.js": "^0.8.26"
3839
},
3940
"devDependencies": {
4041
"@angular-devkit/build-angular": "~0.7.1",
4142
"@angular-devkit/schematics": "^0.7.1",
42-
"@angular/cli": "~6.1.1",
43+
"@angular/cli": "~6.1.2",
4344
"@angular/compiler-cli": "^6.1.0",
4445
"@angular/language-service": "^6.1.0",
4546
"@angularclass/hmr": "~2.1.3",

demo/src/app/app.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {NgModule} from '@angular/core';
2-
import {HttpModule} from '@angular/http';
32
import {FormsModule} from '@angular/forms';
43
import {BrowserModule} from '@angular/platform-browser';
54
import {TransferHttpCacheModule} from '@nguniversal/common';
@@ -9,6 +8,8 @@ import {AppSharedModule} from './shared/shared.module';
98
import {HomeModule} from './home/home.module';
109
import {AppComponent} from './app.component';
1110
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
11+
import {HttpClient, HttpClientModule} from '@angular/common/http';
12+
import {MarkdownModule} from 'ngx-markdown';
1213

1314
@NgModule({
1415
declarations: [
@@ -19,10 +20,11 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
1920
// The application ID can be any identifier which is unique on
2021
// the page.
2122
BrowserModule.withServerTransition({appId: '@angular-material-extensions/link-preview-demo-id'}),
23+
MarkdownModule.forRoot({loader: HttpClient}),
2224
TransferHttpCacheModule,
2325
BrowserAnimationsModule,
2426
FormsModule,
25-
HttpModule,
27+
HttpClientModule,
2628
AppRoutingModule,
2729
AppSharedModule,
2830
HomeModule

demo/src/app/getting-started/getting-started.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ <h1>Getting Started</h1>
66

77
<section class="getting-started">
88
<div class="container">
9-
<!-- put your content here-->
10-
Put your content here. Typically instructions about how to install/use your library.
9+
<markdown src="https://cdn.rawgit.com/angular-material-extensions/link-previewmaster/README.md"></markdown>
1110
</div>
12-
</section>
11+
</section>

demo/src/app/getting-started/getting-started.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { GettingStartedComponent } from './getting-started.component';
44
import { GettingStartedRoutingModule } from './getting-started-routing.module';
5+
import {MarkdownModule} from 'ngx-markdown';
56

67
@NgModule({
78
imports: [
89
CommonModule,
10+
MarkdownModule.forChild(),
911
GettingStartedRoutingModule
1012
],
1113
declarations: [GettingStartedComponent],

0 commit comments

Comments
 (0)