forked from michaelbromley/ngx-pagination
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated handling of readme & version data
- Loading branch information
1 parent
57459e0
commit e8c28ce
Showing
11 changed files
with
52 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Changelog | ||
|
||
## 6.0.0 | ||
|
||
* Update to new Ivy package format for Angular v13+. | ||
|
||
## 5.1.1 (2020-06-07) | ||
|
||
#### Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
projects/docs/src/app/components/documentation/documentation-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div [innerHTML]="readmeContent" class="readme"></div> | ||
<div [innerHTML]="readmeContent$ | async" class="readme"></div> |
21 changes: 16 additions & 5 deletions
21
projects/docs/src/app/components/documentation/documentation-page.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component, OnInit } from '@angular/core'; | ||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { Observable } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { marked } from 'marked'; | ||
|
||
@Component({ | ||
selector: 'documentation-page', | ||
templateUrl: './documentation-page.component.html' | ||
}) | ||
export class DocumentationPageComponent { | ||
export class DocumentationPageComponent implements OnInit { | ||
|
||
readmeContent: SafeHtml; | ||
readmeContent$: Observable<SafeHtml>; | ||
|
||
constructor(private sanitizer: DomSanitizer) { | ||
this.readmeContent = sanitizer.bypassSecurityTrustHtml('parsedReadme'); | ||
constructor(private sanitizer: DomSanitizer, private httpClient: HttpClient) { | ||
} | ||
|
||
ngOnInit() { | ||
|
||
this.readmeContent$ = this.httpClient.get(`https://raw.githubusercontent.com/michaelbromley/ngx-pagination/master/README.md`, { responseType: 'text' }).pipe( | ||
map(text => marked.parse(text)), | ||
map(res => this.sanitizer.bypassSecurityTrustHtml(res)), | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import {Component} from "@angular/core"; | ||
//const version = require('../../package.json').version; | ||
import versionInfo from "./version.json"; | ||
|
||
@Component({ | ||
selector: 'demo-app', | ||
templateUrl: './demo-app.component.html' | ||
}) | ||
export class DemoAppComponent { | ||
version: string = '???'; | ||
version = versionInfo.version; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": "6.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters