feat(aio): code snippet source available & shown when code missing

Tells reader (usually the author) what code file is missing
Also when no linenums specified, turn them on if num of lines > 10
This commit is contained in:
Ward Bell
2017-04-27 22:57:34 -07:00
committed by Pete Bacon Darwin
parent f1f04fa782
commit 7b94f493b9
7 changed files with 122 additions and 60 deletions

View File

@ -81,6 +81,8 @@ class TestCodeComponent {
@Input() code = '';
@Input() language: string;
@Input() linenums: boolean | number;
@Input() path: string;
@Input() region: string;
get someCode() {
return this.code && this.code.length > 30 ? this.code.substr(0, 30) + '...' : this.code;